1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-06-30 06:30:11 +02:00

fix: dropzone rejection on chrome

This commit is contained in:
Elias Schneider 2022-12-05 22:09:41 +01:00
parent eb142b75f7
commit 75f57a4e57
3 changed files with 14 additions and 20 deletions

View File

@ -10,13 +10,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",

View File

@ -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",

View File

@ -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);