Skip to content
This repository has been archived by the owner on Aug 26, 2023. It is now read-only.

Certain file types will have empty types in the upload event #141

Open
DevinloperNL opened this issue Jan 26, 2022 · 2 comments
Open

Certain file types will have empty types in the upload event #141

DevinloperNL opened this issue Jan 26, 2022 · 2 comments

Comments

@DevinloperNL
Copy link

DevinloperNL commented Jan 26, 2022

When uploading certain files the type will be an empty string in the addedFiles and rejectedFiles object.

This isn't an issue when not using [acceptedTypes], but when using that these files will always be rejected.
I have tested this on the demo page on MacOS and Windows with a Chromium browser.

For me this has happend with .dmg & .msg files:
image
image

@peterfreeman
Copy link
Owner

Hi @DevinloperNL,

can you please share some of your source code? The file type is actually not modified by the library, so I want to check your accept parameter.

@DevinloperNL
Copy link
Author

This happens regardless of the accept parameter. If I try this on the demo page (where the parameter is set to *), as mentioned, this issue also occurs.
When reading the file using FileReader it will read as type application/octet-stream for my testing .dmg and .msg files, but the acceptedFiles array will not contain the file types.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants