ngx-dropzone icon indicating copy to clipboard operation
ngx-dropzone copied to clipboard

Certain file types will have empty types in the upload event

Open DevinloperNL opened this issue 3 years ago • 2 comments

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

DevinloperNL avatar Jan 26 '22 10:01 DevinloperNL

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.

peterfreeman avatar Jan 30 '22 23:01 peterfreeman

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.

DevinloperNL avatar Feb 01 '22 12:02 DevinloperNL