pqina / filepond

🌊 A flexible and fun JavaScript file upload library
https://pqina.nl/filepond
MIT License
15.22k stars 828 forks source link

[Bug] Uploading zip file on Windows vs macOS #899

Closed MrMooky closed 1 year ago

MrMooky commented 1 year ago

Is there an existing issue for this?

Have you updated FilePond and its plugins?

Describe the bug

I have some issues with uploads on Windows - specifically .zip files. They work on macOS, but not on Windows. This is an incomplete list of allowed files types:

'application/zip',
'application/x-zip',
'application/zip-compressed',
'application/x-zip-compressed',
'application/x-7z-compressed',
'application/octet-stream'

When uploading the file on Windows (tested in Chrome and Firefox), I get an error that the file is not supported, while the exact same file(s) works perfectly fine on macOS (same browsers).

Reproduction

https://codesandbox.io/s/nostalgic-mendel-fujz64

Environment

- Device: Lenovo Notebook
- OS: Windows 10
- Browser: Chrome and Firefox
MrMooky commented 1 year ago

Never mind. Found the issue.

mharis commented 1 year ago

@MrMooky What was the issue? I am going through the same issue.

MrMooky commented 1 year ago

@mharis In my case the mime type was slightly different on Windows. There are a few tools available to check the mime type of a file. Be sure to check the file on both Windows and macOS.