-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
File and PDF Components Allowing Unsupported Files to be Uploaded via 'Click to Upload' #9098
Comments
I can't repro the issue with the I will take a look separately at the PDF component. |
Can't reproduce on the PDF component either! |
Hi @freddyaboulton. Thank you for taking a look so quickly! My apologies, I should have included more information. I am running on windows. First open the file explorer by clicking on 'Click to upload'. Then click on the dropdown as shown in red. Select 'All Files'. Select any invalid file type. In my example I uploaded a .jpg in the .zip component. Heres the code of the component: submissions_zip_filepath = gr.File(label="Student Solutions (.zip)", I was able to upload a .jpg to the component that only accepts .zip file_types. I did not receive any error or warning. The same issue can be found on the gradio PDF component with the steps as described above. I uploaded a .jpg in the PDF component. I did try it on a different PC with the newest gradio and its dependencies. My apologies I am not sure what the same steps would be on MacOS. Your help would be really appreciated! Thank you. |
Gotcha @Jocelyne-Smith - looks like its a windows issue then! |
Closed via #9431 in |
Describe the bug
When using 'click to upload' on a gradio File component, a user is able to select files that are not specified in the file_types=[]. Similarly a user can upload a non-PDF file when using the 'click to upload' for the gradio PDF component. The same 'Invalid file type only x allowed' error should probably be displayed when a user tries to upload an invalid file type.
Have you searched existing issues? 🔎
Reproduction
Screenshot
Logs
No response
System Info
Severity
I can work around it
The text was updated successfully, but these errors were encountered: