-
-
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
Reset on browse? #53
Comments
Sorry, I just missed to set overwriteInitial to false... |
Actually that didn't fix the problem, the upload just resets to the initial overwrite. Any other selected files is removed by the clear method when hitting upload the next time. So I still wonder why the upload is cleared when clicking the browse button. |
I hope you understand the reason for the expected behavior. The HTML native file input can push data only one way. It cannot read or edit older data like other HTML inputs. You need to handle such situations separately (beyond the scope of this extension). However, the plugin does help you with events, customizing layouts, adding new buttons, to handle such custom scenarios. With regards, why the older file selection is cleared when you click browse button ... refer issue #19. Its the inherent behavior of the HTML native file input which automatically clears the files selected whenever you click the input and cancel the file dialog. Hence the selected file preview is cleared for this reason. If this is NOT DONE you will end up with an empty $_FILES array on form submission - but preview shows the old image. Its done for a logical reason to mimic the HTML file input functionality (unfortunately the plugin is limited by HTML file input functionality at this stage). |
Ok I understand, didn't know that the native file input was cleared when the file dialog was shown. I'll rethink the UI then, thanks! |
Would you be open to adding an event for when the file input changes from having a file to being empty like I have done here: jespermjonsson@97728b2 |
Will consider this as an enhancement. |
What is the reason for resetting the fileupload when clicking on the browse button? If the user then decides to cancel the file dialog the current selected file is lost. I tested to uncomment self.clear(false) within the listen method and everything seems to be working, but maybe not in some edge case(s)?
The text was updated successfully, but these errors were encountered: