-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If file upload fails, upload button does not work again #1045
Comments
Unless you use single file upload... all files selected on client are reset & cleared after server processing (either success or failure)... refer #985. You therefore either need to use single file upload OR for multiple file upload need to handle these error files via your server code ... or code your app to communicate to user to retry file selection. |
I am uploading a single file. But it still beats the purpose of showing the upload button when you have already decided not to let the users re upload the file. Moreover, when I select multiple files and try and upload a single file, all file upload buttons start showing the error that upload failed even though it failed for a single file. The same should happen in this case too although usability is lost. |
As mentioned earlier - please read it correct... for a single file upload mode you should be able to re-upload the file only if your server upload code returns an error (assuming you have the right updated codebase from this repo). For multiple file batch upload - there is no consistent way of handling server errors on the client code. You need to program your app use case based on the type of server validation error you have programmed on your server (for example rejecting files based on count, total size, type, virus scan etc.). Based on the same you need to use fileinput events to trap these server errors and control your front end UI. For multiple upload, if you use the upload icon within each single thumbnail to trigger upload and receive a server upload error - only the thumbnail that faces the error will be marked as error and not others. Only when you trigger the batch upload via the common upload button - you will need to handle the code accordingly on your server. For example - try using a HTML native file input for multiple file upload and submitting the files via form - do you get errors specific to each file uploaded and can you control specific files uploaded? Go through the discussion in #985 as well ... and feel free to put in your suggestions.. |
When you write single upload, I assume you mean the individual upload button on each of the selected file. In my use case, I do send back json data with error property. The error gets displayed fine. But again the upload button is still available/visible. Clicking on it does nothing. I am not doing a batch upload. |
If you use the individual upload icon on each thumbnail - it should allow you to retry the upload even in MULTIPLE upload mode. Confirm if you are not seeing this and you ARE using the latest plugin code from the repository? As I mentioned, I am open to suggestions - but there is no concrete way to validate server batches uploaded in bulk together. You need to consider all use cases rather than ONE off.. before mentioning a solution. Have you tried using a HTML native normal file input and selecting say 20 files together and submitting the form to server. Let us say internet connectivity is lost in between... is there a way you can code your client user interface to understand and retry? What if you as developer need to genuinely reject say 5 files on server and return an error and user still keeps on retrying the same... how will the client code understand what the server code meant to reject the file as? There are many such needs which are best handled from your server code... but will try to see if I can include feedback from others. |
I think you misunderstood a part of the issue.
Why is the upload button still available when the upload has already failed
and users (as decided by you) would not be able to re-upload?
Also, I am not trying to upload the files as a batch. I am actually
uploading by clicking on the individual upload button. Why would it affect
the other upload buttons?
Moreover, even with 20 files in a single upload we could send in related
data and then send back which ones failed and show the message accordingly.
I do not want the client to retry automatically. But would definitely like
users to be able to retry uploading.
…On Fri, Aug 18, 2017 at 1:14 PM, Kartik Visweswaran < ***@***.***> wrote:
- Single Upload means multiple property of file input is NOT SET...
which means you can SELECT ONLY ONE file and thus UPLOAD ONLY ONE file.
Have you tried using it?
As I mentioned am open to suggestions - but need you to consider all use
cases rather than ONE off.. before mentioning a solution. Have you tried
using a HTML native normal file input and selecting say 20 files together
and submitting the form to server. Let us say internet connectivity is lost
in between... is there a way you can code your client user interface to
understand and retry? What if you wish you to genuinely reject 5 files and
user still keeps on retrying the same... how will the client code
understand what the server code meant to reject the file as?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1045 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEvV8DDH-KDXsU-5AjTE1cc52WcYJtACks5sZUDRgaJpZM4O5aC5>
.
|
Upload button for each errored thumbnail should be DISABLED as part of the process once file upload for the specific thumbnail errors out indicating that the upload action cannot be done. Are you seeing something different? |
Yes. The button is still clickable but does nothing. Either disable it or
hide it.
…On Fri, Aug 18, 2017 at 3:47 PM, Kartik Visweswaran < ***@***.***> wrote:
Upload button for each errored thumbnail should be DISABLED as part of the
process once file upload for the specific thumbnail errors out indicating
that the upload action cannot be done.
Are you seeing something different?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1045 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEvV8H2EyuYzum3bg-IEZ9GNK2t4CclUks5sZWTOgaJpZM4O5aC5>
.
|
Ok I am adding a series of enhancements. Refer new issue for that #1048. |
I tried to upload a file and it had some error. The error message showed up fine. But for some reason if I click on the upload button again, the upload does not get fired. I checked and the button was enabled so I do not see why it would not upload again.
The text was updated successfully, but these errors were encountered: