Don't allow duplicates of a file
See original GitHub issueFeature Request
Describe the solution you’d like
There should be a way to make sure users can’t upload 2 of the same files.
Describe alternatives you’ve considered
I’ve tried to do this outside of the dropzone, but there doesn’t seem to a way.
Teachability, Documentation, Adoption, Migration Strategy
It could just be a prop passed in called noDuplicates
Additional context
See my stack overflow question here: https://stackoverflow.com/questions/63198613/how-do-i-make-a-material-ui-dropzone-area-not-allow-duplicates
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9 (2 by maintainers)
Top Results From Across the Web
c# - Preventing Duplicate List<T> Entries - Stack Overflow
List<T> does indeed allow duplicates. In the case of FileInfo , the Contains method will be checking whether the references are the same, ......
Read more >How to prevent duplicates in a column in Excel - Ablebits
Select the entire column where you need to avoid duplicates. Click on the first cell with data keeping the Shift keyboard button pressed...
Read more >How to stop files from creating duplicates on an external hard ...
saved on my external hard drive, it seems to be making a copy/duplicate of each file with a ._ in front of the...
Read more >Prevent Duplicate Entries in Excel (Easy Tutorial)
In the Allow list, click Custom. 4. In the Formula box, enter the formula ... This value may only occur once (=1) since...
Read more >How can I prevent duplicate files on my c… - Apple Community
Start in the Songs view. Use File > Library > Show Duplicate Items and then click Same Album to display exact duplicates as...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Since this is something many people would need, don’t you think it would be best to implement it as a feature?
Here is the boilerplate for you to use to filter out duplicates. Use DropzoneAreaBase instead to add your own handler for the onAdd onDelete methods.
this is using state via [songs, setSongs] for the fileObjects prop