diff --git a/src/components/Dropzone.tsx b/src/components/Dropzone.tsx index 2d1034b..dd45514 100644 --- a/src/components/Dropzone.tsx +++ b/src/components/Dropzone.tsx @@ -92,6 +92,12 @@ export const Dropzone: React.FC = ({ setImage }) => { setImage(assetUrl); + /** + * Wait here to ensure the file has been read + * before removing it. + */ + await new Promise(resolve => setTimeout(resolve, 1500)); + await removeFile(filepath); } catch (error) { console.error(error);