edemaine / coauthor

Coauthor supercollaboration/discussion forum
MIT License
249 stars 34 forks source link

Re-use duplicate files #625

Open edemaine opened 1 year ago

edemaine commented 1 year ago

If you upload a file with the same MD5 as an existing file, check for identical contents and (if so) delete newly uploaded file and link to old file ID instead (or change new file ID to "symlink" to old file ID? otherwise need a way to pass the new ID back to the client).

Probably want to add an MD5 index if there isn't one already.

For existing files, I wonder whether we should have a special "clean up" function (perhaps just a secret method, or a superuser button on root with the Recomputes) that checks for duplicate files, relinks to use the oldest one, and deletes later copies. Maybe could go with the file display of #279.