Hash images/files to reduce double files #1263
Rar9
started this conversation in
Feature Requests & Ideas
Replies: 1 comment 3 replies
-
You could do this fairly simple by adding a field to your upload collection for the hash with: // field in the collection
{
name: 'hash',
type: 'text',
unique: true,
hooks: {
beforeChange: [
({siblingdata}) => {
return md5(siblingData.file)
}
],
},
} Something like this should work. I'm replying on mobile and haven't had a chance to test this. Let me know how it goes. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to allow ONE image/file to be uploaded, so NO double image/files via can be uploaded?
I believe this could be done by some hash hook on images/files to reduce storage space?
If so how?
I also believe unsave/discarded uploads are never removed :-(
Beta Was this translation helpful? Give feedback.
All reactions