Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created June 21, 2012 10:06
Show Gist options
  • Select an option

  • Save ruprict/2964974 to your computer and use it in GitHub Desktop.

Select an option

Save ruprict/2964974 to your computer and use it in GitHub Desktop.
{"steps": {
"portrait" : {
"robot" : "/file/filter",
"use" : ":original",
"accepts" : [
["${file.meta.height}", ">", "${file.width}"]
],
"error_on_decline" : false
},
"landscape" : {
"robot" : "/file/filter",
"use" : ":original",
"accepts" : [
["${file.meta.height}", "<=", "${file.width}"]
],
"error_on_decline" : false
},
"img1": {
"robot": "/image/resize",
"use" : ":original",
"width": "560"
},
"top": {
"robot": "/image/resize",
"use" : "portrait",
"width": "260",
"height" : "125",
"resize_strategy" : "fillcrop",
"gravity" : "top"
},
"center": {
"robot": "/image/resize",
"use" : "landscape",
"width": "260",
"height" : "125",
"resize_strategy" : "fillcrop",
"gravity" : "center"
},
"img2": {
"robot": "/image/resize",
"use" : ":original",
"width": "680",
"resize-strategy" : "fillcrop"
},
"export": {
"use" : [":original","img1", "img2"],
"robot": "/s3/store",
"key": "blah",
"secret": "blah",
"bucket": "blah",
"path": "uploads/posts/photo/${assembly.id}/${previous_step.name}_${file.url_name}"
},
"exportTop": {
"use": ["center","top"],
"robot": "/s3/store",
"key": "blah",
"secret": "blan",
"bucket": "blah",
"path": "uploads/posts/photo/${assembly.id}/preview_${file.url_name}"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment