You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, using the supplied file-field component you cannot select the same file twice.
In the sense that (assuming you have the code to support this)
User selects a file
Through the implementation, the user cancels that upload
User remembers that in fact, that was the correct thing to do
User try's to upload that same file again
Expected: The filesDidChange action to be triggered with the file selected.
Actual: The filesDidChange action is not fired because the change event is not fired.
This is actually the default behavior of input type file. The inputs value attribute still holds the previous file and does not think it has changed, and thus, no change event.
If ember-uploader wants the default behavior to clear the input value after filesDidChange event then it would be as simple as adding a hook to clear that value.
If ember-uploader does not want this behavior, let this issue be found in google searches henceforth.
In our implementation, to fix this, we added a this.$('input').val(null) after the change handler which resets the inputs value attribute:
The problem with this is that just clearing the value, depending on the browser, doesn't always work. You could simulate what you are referring to by rendering a new file input after selection.
Great addon!
Right now, using the supplied
file-field
component you cannot select the same file twice.In the sense that (assuming you have the code to support this)
Expected: The
filesDidChange
action to be triggered with the file selected.Actual: The
filesDidChange
action is not fired because the change event is not fired.This is actually the default behavior of input type file. The inputs
value
attribute still holds the previous file and does not think it has changed, and thus, no change event.If
ember-uploader
wants the default behavior to clear the input value afterfilesDidChange
event then it would be as simple as adding a hook to clear that value.If
ember-uploader
does not want this behavior, let this issue be found in google searches henceforth.In our implementation, to fix this, we added a
this.$('input').val(null)
after the change handler which resets the inputs value attribute:Relates to: #134
The text was updated successfully, but these errors were encountered: