[bug]: uploadthing/react - Java-Archive(.jar) file upload type does not show up when choosing files
Provide environment information
System:
OS: Windows 11 10.0.26100
CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700KF
Memory: 12.70 GB / 31.85 GB
Binaries:
Node: 20.14.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - C:\Program Files\nodejs\yarn.CMD
npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.11.0 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.26100.1882
npmPackages:
@uploadthing/react: 7.3.0 => 7.3.0
typescript: ^5.7.3 => 5.7.3
uploadthing: 7.5.2 => 7.5.2
Describe the bug
When I set the accepted file types to upload to "application/java-archive" I get the accepted files in my file-explorer to upload All Files (*.*) instead of only .jar
Link to reproduction
https://stackblitz.com/edit/github-92heuda2?file=src%2Fserver%2Fuploadthing.ts
To reproduce
Set the allowed file types to "application/java-archive" and try to upload a file Add to the config
resourceUpload: f({
'application/java-archive': { maxFileSize: '16MB' }, //Will only allow ALL files
// 'application/zip': { maxFileSize: '16MB' }, //Will only allow .zip even if java-archive is active
})
uncomment the zip and you will only be able to upload .zip files
Additional information
Would love if I could set a custom list of file types the button will allow me to upload by default
๐จโ๐งโ๐ฆ Contributing
- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR fixing this bug!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
I believe this is a browser/platform issue, not an Uploadthing issue, as both cases are working fine for me on Arc/MacOS.
I believe this is a browser/platform issue, not an Uploadthing issue, as both cases are working fine for me on Arc/MacOS.
Screen.Recording.2025-02-26.at.11.50.50.mov
Would there be any way to fix this? I'm using the most used browser in the world Chrome, and the latest version of windows 11, has to be a way to support it. Maybe am I able to set the specific files the client can upload by default by overriding their types?
Can you try out this tester and let me know which (if any) of the inputs properly filter for you?
https://codepen.io/retool-mark/full/OPJbWwK
Thats a nice tester there.
All seem to work MINUS the application/java-archive file type
The rest filter out the correct stuff on my file explorer
Ok, we are using mime types like that for the UT components, so that lines up. I think we might be able to do mimes + extensions though for better windows support.