Request for MD5 hash return of original image

Archived from the Transloadit support forum. Originally posted on September 22, 2012; details may be outdated, see our docs for current behavior. Original thread

Request for MD5 hash of original image (original_md5). This will allow us to identify duplicate photo uploads. I have seen some other requests on the forum for dedupe option.

This would be a very simple md5 or the original image and returning the value.

Something like:

[id] => REDACTED

                                [name] => 8686_1a94dde30030646e3115b649f0e94583_o.jpg
                                [basename] => 8686_1a94dde30030646e3115b649f0e94583_o
                                [ext] => jpg
                                [size] => 6233
                                [mime] => image/jpeg
                                [type] => image
                                [field] => file_1
                                [original_id] => REDACTED
                                [original_md5] => REDACTED

Hey carson,

I have added this to our todo. Thanks for recommending this.

kind regards,
Tim

Co-Founder Transloadit

Is there any reason you propose to use md5 and not for example sha1?

SHA1 is a good hash and is often considered more secure than MD5 for password hashing, but MD5 is the standard to generate a security signature for a file, photo, software, etc. MD5 in php, desktop, etc, all return the same result and is more common.

I would recommend MD5 because we can cross check your return later via any php or ruby installation w/ no extra configuration needed.

Carson

Added to todo. Will work on this over NodeDublin on Thursday.

kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Hey Carson,

I have added the functionality. Both uploads results should have an “md5hash” attribute now.

Can you please confirm that this is working for you?

kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Tim, thank you very much for the fast turnaround I will test this weekend.

Carson

Sent from Carson’s iPhone

You are welcome. :slight_smile:

Closing this.

Hey Carson,

we are going to move this into options, because most of the people do not need this by default and it puts some additional disk I/O on our machines.

The options will be:

  • calc_md5_hash_for_uploads: true in your form params to calculate the hash for uploaded files. You most likely need that.
  • calc_md5_hash: true as an additional parameter for your assembly steps to calculate the has for robot results.

Please install these options already, so that the md5hashes are still calculated once we roll out the change.

kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Alright, the opt-in parameters are now active.

kind regards,
Tim

Co-Founder Transloadit
@tim_kos

Thanks!

Sent from Carson’s iPhone

Alright closing this, as this feature has shipped.