Closed ajai-am closed 1 week ago
This logic is handled in react-dropzone library, you are report the issue in their repository. Currently the issue cannot be fixed on Mantine side.
Hi @rtivital I tried using react-dropzone v14.2.9, there, this bug doesn't occur, probably they had this bug & got if fixed down the line it seems.
I came across this url https://codesandbox.io/p/devbox/currying-thunder-jq6d5, when i tried I got the expected result.
As I can see from the forked repo of yours https://github.com/rtivital/react-dropzone-esm it was lasted updated on 2023, could it be that this fix was not added into your forked version?
Since the mantine dropzone, directly depends on react-dropzone-esm & not react-dropzone, hence raising this request.
Okay, I'll update react-dropzone-esm to the latest react-dropzone changes in one of the next patches
Thank you
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.12.2
What package has an issue?
@mantine/dropzone
What framework do you use?
create-react-app (CRA)
In which browsers you can reproduce the issue?
All
Describe the bug
Description:
When using the
Dropzone
component from Mantine with.xlsm
files, there is an inconsistency in file type detection depending on the file selection method..xlsm
file, theonDrop
callback correctly identifies the MIME type asapplication/vnd.ms-excel.sheet.macroenabled.12
.useFsAccessApi
: If I use the file selection dialog withuseFsAccessApi
enabled (set totrue
), the MIME type in theonDrop
callback is an empty string. Consequently, the browser defaults toapplication/octet-stream
when sending the file to the backend, causing issues with correct file type handling.Expected Behavior:
When selecting
.xlsm
files through the file selection dialog withuseFsAccessApi
enabled, the MIME type should be detected asapplication/vnd.ms-excel.sheet.macroenabled.12
, consistent with the drag-and-drop method.Steps to Reproduce:
useFsAccessApi
enabled..xlsm
file using both drag-and-drop and file selection.onDrop
callback.This discrepancy impacts handling of
.xlsm
files in applications that rely on correct MIME type detection.If possible, include a link to a codesandbox with a minimal reproduction
No response
Possible fix
No response
Self-service