Skip to content

Commit

Permalink
do not delete temp file
Browse files Browse the repository at this point in the history
  • Loading branch information
FarazPatankar committed Jul 7, 2022
1 parent 562cfca commit 19a2ebd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/Dropzone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ export const Dropzone: React.FC<DropzoneProps> = ({ setImage }) => {
setImage(assetUrl);

/**
* Wait here to ensure the file has been read
* before removing it.
* TODO: Delete the file before the user closes the app.
* We cannot delete it now because we need it when the user
* tries to save the image.
*
* Unless we generate a base64 data URL?
*/
await new Promise(resolve => setTimeout(resolve, 1500));

await removeFile(filepath);
} catch (error) {
console.error(error);
}
Expand Down

0 comments on commit 19a2ebd

Please sign in to comment.