Upload amazon

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

Just last one step is sent to amazon s3, why???

<!-- We initialize the Transloadit plugin here →
<script type=“text/javascript”>
$(function() {
// We reference our html form here
$(‘#produtoForm’).transloadit({
// We want to wait for all encodings to finish before the form is submitted. wait: true,
// The upload to Transloadit should start as soon as the user selects some files. triggerUploadOnFileSelection: true,

 params: {
auth: {
// This is your API key.
key: "REDACTED"
},
// Our assembly instructions just contain two steps for now. You can name the steps whatever you want.
steps: {
jpg_thumb: {
use: ":original",
robot: "/image/resize",
width: 75,
height: 75,
resize_strategy: "pad",
background: "#ff0000",
format: "jpg"
},
png_with_watermark: {
use: ":original",
robot: "/image/resize",
width: 125,
height: 125,
format: "png",
watermark_url: "https://transloadit.com/img/logo.png&quot;,
watermark_position: "bottom-right",
watermark_size: "10%"
},
original_in_sepia_and_rotation: {
use: ":original",
robot: "/image/resize",
width: 125,
height: 125,
sepia: 80,
rotation: 15
}, "export": {"robot": "/s3/store","key": "REDACTED","secret": "REDACTED"bucket": "mdmfotoproduto"
}
}
}
});
});
</script>

Hey Rodrigo,

you need to use the use" parameter.

Add

“use”: [;, “jpg_thumb”, “png_with_watermark”, “original_in_sepia_and_rotation”],

to your export step and it will submit all steps (including the original uploaded files) to S3.

Kind regards,
Tim

Co-Founder Transloadit
@tim_kos

It worked tks!

Why when I send an image to s3 transloadit create folders in my bucket?

For example: /mdmfotoproduto/11/dab7beeed617df0b586c40018148af/applewood.png?

It is because of the default value of the “path” paramtee of the s3 robot. Please check the docs here https://transloadit.com/docs/conversion-robots#s3-store

Kind regards,

Tim Koschuetzki
Co-Founder Transloadit
@tim_kos