Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Avoid Duplicates #772

Open
1 task
bfourgeaud opened this issue Apr 28, 2024 · 1 comment
Open
1 task

feat: Avoid Duplicates #772

bfourgeaud opened this issue Apr 28, 2024 · 1 comment
Labels
✨ enhancement suggestion or feature request to improve uploadthing planned We would like this to happen

Comments

@bfourgeaud
Copy link

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!
@bfourgeaud bfourgeaud added the ✨ enhancement suggestion or feature request to improve uploadthing label Apr 28, 2024
@juliusmarminge juliusmarminge added the planned We would like this to happen label Apr 29, 2024
@juliusmarminge
Copy link
Collaborator

This is planned, but not sure how high up on the priority list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement suggestion or feature request to improve uploadthing planned We would like this to happen
Projects
None yet
Development

No branches or pull requests

2 participants