Archived from the Transloadit support forum. Originally posted on July 18, 2011; details may be outdated, see our docs for current behavior. Original thread
{ "steps": {
"thumbnail": {
"robot": "/image/resize",
"resize_strategy": "crop",
"width": 150,
"height": 150,
"format": "png"
},
"store": {
"use": [":original", "thumbnail"],
"robot": "/s3/store",
"key": "xxx",
"secret": "xxx",
"bucket": "xxx"
}
} }
I’m looking to use just one template for all uploads and to derive the file-type from your response. I’m not sure what the alternative would be other than trying to detect the file-type by extension in js and then directing uploads to different templates depending on the type. Ideally, images would get thumbs generated and everything else would simply skip that step. When uploading a non-image to this template I get a “result” field for :original for some files and not for others. My assemblies log shows that a “result” is being created for :original for all files however its not always being returned to me.
Is this crazy?