#Stop same image file upload

12 messages · Page 1 of 1 (latest)

keen elbow
#

Is it possible to check if the uploaded image (same name & size) already was uploaded before, to save on space?

bold scarab
#

i dont think so

#

maybe if you add a filter hook, generate a checksum or something but i dont think that works 100%

keen elbow
#

Yes, but a simple system check on actual upload would a great directus enhancement.

bold scarab
#

create a GH discission i guess

lavish schooner
#

by using this filter hook it would be technically be possible, e.g. by storing the md5 of each file uploaded along with the actual file. You should be able to set this up by Flows with very few lines of code

#

The flow can be used as blocking (filter) and runs the Script operations to generate any hash on the fly.
afterwards, search for this hash in the target collection, if results is emtpy, save the newly posted item and store the hash as additional field.

fathom wave
#

Via the flow interface it is not possible to select the files.upload event for a filter -- only actions can be triggered by this event.
Is is possible to use the files.upload event when creating such a flow manually (e.g. via API)?

glass dirge
keen elbow
lavish schooner
fathom wave