How to, only upload files that haven't previously been uploaded

Is there a way to check if a file has already been uploaded previously? so we don’t upload these again

many thanks

If you try to upload the same file in the same session, uppy will know and prevent it. But if the user comes back at a later time then uppy doesn’t know. Depending on where you upload, you might be able to create a pre-processor that checks it.

Hi Merlijn,
Yes if a user comes back at a later time

Any thoughts how you would go about this?

many thanks

Example pre-processor: Building plugins | Uppy

Perhaps you could try to save the file IDs you get back from events, such as upload-success or complete, and put those in local storage.

Then in your pre-processor, or perhaps in onBeforeFileAdded, you check wether the ID already exists.

1 Like