Skip to content

Commit

Permalink
fix: dropzone rejection on chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Dec 5, 2022
1 parent eb142b7 commit 75f57a4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 20 deletions.
14 changes: 7 additions & 7 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
"dependencies": {
"@emotion/react": "^11.10.5",
"@emotion/server": "^11.10.0",
"@mantine/core": "^5.9.1",
"@mantine/dropzone": "^5.9.1",
"@mantine/form": "^5.9.1",
"@mantine/hooks": "^5.9.1",
"@mantine/modals": "^5.9.1",
"@mantine/next": "^5.9.1",
"@mantine/notifications": "^5.9.1",
"@mantine/core": "^5.9.2",
"@mantine/dropzone": "^5.9.2",
"@mantine/form": "^5.9.2",
"@mantine/hooks": "^5.9.2",
"@mantine/modals": "^5.9.2",
"@mantine/next": "^5.9.2",
"@mantine/notifications": "^5.9.2",
"axios": "^1.2.0",
"cookies-next": "^2.1.1",
"file-saver": "^2.0.5",
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/components/upload/Dropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ const Dropzone = ({
return (
<div className={classes.wrapper}>
<MantineDropzone
// Temporary fix for Dropzone issue (https://github.com/mantinedev/mantine/issues/3115)
getFilesFromEvent={(e) => {
return Promise.resolve([
...((e.target as EventTarget & HTMLInputElement)?.files as any),
]);
}}
maxSize={parseInt(config.get("MAX_FILE_SIZE"))}
onReject={(e) => {
toast.error(e[0].errors[0].message);
Expand Down

0 comments on commit 75f57a4

Please sign in to comment.