open-prices-frontend
open-prices-frontend copied to clipboard
Use file checksum to detect when a duplicate image is uploaded
Problem
When uploading an image that has already been uploaded before, the image is added as a duplicate and given a new proof ID.
Proposed solution
Use the file checksum to check if the same file already exists and assign the existing proof ID of that file to the price upload form instead of reuploading the file.
Additional context
Additionally, a message could be displayed informing the user about what happened. To do this, checksums of the original files would probably have to be stored since they won't be the same as the final compressed files.