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
For a file upload (v-file-input) component, we have an option for removing the selected file.
Actual Behaviour:
But here, when we remove the selected file from file upload input, we get an error stating TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob', and state remains the same.
Expected Behaviour:
The new state value should be empty.
This is because of the current code structure in lib/mixins/FileProperty.js, wherein if there is no file selected, an error is thrown (from getFileDataUrl method), and the input and change method of the file input component is not called, and thus the state remains unchanged.
Perhaps we can include an empty check case when removing the selected file, so that the new state value is updated accordingly.
The text was updated successfully, but these errors were encountered:
For a file upload (v-file-input) component, we have an option for removing the selected file.
Actual Behaviour:
But here, when we remove the selected file from file upload input, we get an error stating
TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'
, and state remains the same.Expected Behaviour:
The new state value should be empty.
This is because of the current code structure in
lib/mixins/FileProperty.js
, wherein if there is no file selected, an error is thrown (fromgetFileDataUrl
method), and the input and change method of the file input component is not called, and thus the state remains unchanged.Perhaps we can include an empty check case when removing the selected file, so that the new state value is updated accordingly.
The text was updated successfully, but these errors were encountered: