Directus
#### :rotating_light: MIGRATED FROM REQUESTS.GETDIRECTUS.COM :rotating_light:

# Store File Data hash to warn of duplicates

### :+1: = 4


-----
### @benhaynes – (1 year ago)

By saving a hash of the files data in directus_files, we SHOULD be able to warn users about duplicate resources when they upload a file – and offer them the option to use the existing resource instead.

Thanks @doughnet!




-----
### @doughnet – (1 year ago)

Love this idea!




-----
### @rijkvanzanten – (1 year ago)

Wouldn't this cause the database to be filled with massive amounts of data? Lets say I upload a 8MB file, would that 8MB be hashed and put in the DB?




-----
### @jrefi – :+1: (1 year ago)

If by hash they are referring to the checksum of the file, then no, the entire file would not need to be saved to the DB. For example, a SHA-256 checksum requires 256 bits (64 bytes), so the overhead is fairly low.




-----
### @diegogurpegui – :+1: (8 months ago)

Great idea