uploadthing
uploadthing copied to clipboard
feat: Avoid Duplicates
Describe the feature you'd like to request
It would be great if it was possible to avoid duplicate files. If I upload an image that already exists in the database (check hash for example, or set a custom_id), uploadthing would return the data of that already existing file instead of uploading it again.
Describe the solution you'd like to see
Maybe an option in the FileRouterInputConfig and add a property overwrite: boolean
Or setting a custom metadata on each file with a custom hash that we would calculate on everyfile before uploading. And uploadthing would match existing files based on that metadata.hash
Additional information
No response
๐จโ๐งโ๐ฆ Contributing
- [ ] ๐โโ๏ธ Yes, I'd be down to file a PR implementing this feature!
This is planned, but not sure how high up on the priority list.