Archived from the Transloadit support forum. Originally posted on August 6, 2013; details may be outdated, see our docs for current behavior. Original thread
I have enabled the "calc_md5_hash": true parameter on an encoder, but I don’t see the hash anywhere in the results…
Ideally I’d like each “output” file to be renamed to include the unique hash (so overwrites don’t matter, always the same content)
I would like to use the MD5 of the original file from the import step in the filename of my export step. I see there is `unique_original_prefix`, but it’s not clear that this is a hash of the file contents or something that changes between assemblies even if the same file is uploaded across multiple assemblies.
no the unique_original_prefix is just the first two letters/digits of the original_id, which is the id of the originally uploaded file. So over time, this will not be unique.
Is this just for making sure files are always unique? Or is this about making sure the same file is not uploaded twice to your system? If it’s the former, using ${file.id} should suffice as that is a uuid. If the latter, you could match the generated md5_hash with your records in your database.
I might not see the full picture, so do you mind explaining your use case a bit? Then we can find a good solution here I am sure.