FileUpload Invalid File messages not displaying on repeat attempts #1399
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
vue2-portable
Milestone
I'm submitting a ... (check one with "x")
CodeSandbox Case (Bug Reports)
Please demonstrate your case at CodeSandbox by using the issue template below. Issues without a test case have much less possibility to be reviewed in detail and assisted.
https://codesandbox.io/s/magical-framework-bzus5?file=/src/App.vue
Current behavior
Using Advanced style of
FileUpload
, selecting a file that exceedsmaxFileSize
or does not matchaccept
pattern displays the invalid file message. Clicking the button to close this message, and choosing the exact same file will fail silently without showing the message.Selecting a different file after closing the error message displays a new error correctly.
Expected behavior
selecting a file that exceeds
maxFileSize
or does not matchaccept
pattern displays the invalid file message. Clicking the button to close this message, and choosing the exact same file displays the same invalid file message again.Minimal reproduction of the problem with instructions
maxFileSize
oraccept
set.accept
constraint)CodeSandbox with file size constraint set to 1:
https://codesandbox.io/s/magical-framework-bzus5?file=/src/App.vue
The issue can be replicated on PrimeVue showcase as well:
https://primefaces.org/primevue/showcase/#/fileupload
What is the motivation / use case for changing the behavior?
If the user absent-mindedly closes the first error message and chooses the same file, the component appears to not react and may lead the user to believe the file upload feature is broken.
If this functionality is tied to filenames, this could also cause issues with files that have identical names but different properties.
Please tell us about your environment:
Tested on:
Windows 10, Visual Studio Code, npm
Manjaro 19.0, Visual Studio Code, npm
The text was updated successfully, but these errors were encountered: