Merge branch 'hotfix/v1.0.1' of https://github.com/ONLYOFFICE/DocSpace into hotfix/v1.0.1

This commit is contained in:
Maria Sukhova 2023-05-02 15:14:43 +03:00
commit dc677e67d1

View File

@ -76,6 +76,7 @@ const Dropzone = ({ t, setUploadedFile, isDisabled }) => {
timer.current = setTimeout(() => {
setLoadingFile(true);
}, 50);
try {
const imageBitMap = await createImageBitmap(file);
const width = imageBitMap.width;
@ -107,6 +108,13 @@ const Dropzone = ({ t, setUploadedFile, isDisabled }) => {
setLoadingFile(false);
}
});
} catch (error) {
toastr.error(error);
timer.current && clearTimeout(timer.current);
if (mount.current) {
setLoadingFile(false);
}
}
};
const { getRootProps, getInputProps } = useDropzone({