
/s3/store robot
Exports the input file into an Amazon S3 bucket.
See the tutorial on using your own s3 bucket if you are new to Amazon S3.
Required parameters
| Name | Type | Description |
|---|---|---|
| bucket | string | The name of the bucket to export the file to. |
| key | string | Your Amazon Access Key ID. |
| secret | string | Your Amazon Secret Access Key |
Optional parameters
| Name | Type | Default | Description |
|---|---|---|---|
| path | string | "${unique_prefix}/${file.url_name}" |
The path to use for storing the file. See below for a list of supported assembly variables. |
| url_prefix | string | "http://<bucket>.s3.amazonaws.com/" |
The url_prefix to use for the returned url. For example:
"http://my.cdn.com/some/path".
|
| acl | string | "public-read" |
The permissions to set for this file. You can choose from: "public-read",
"public" or "private".
|
| headers | string | {"Content-Type": file.mime} |
A JS object holding a list of headers to set for this file on S3. See below for a list of supported
assembly variables. Example: {"FileURL":"${file.url_name}"}
|
| host | string | "s3.amazonaws.com" |
The host of the storage service you are using. You only need to set this if you are hosting with storage service that is not Amazon S3 but has a compatible API (like hosteurope.de). |
Assembly Variables
The following is a list of placeholder variables available in the path parameter:
| Variable | Description |
|---|---|
| ${account_id} | The id of your transloadit.com account |
| ${assembly.id} | The id of the assembly - which represents the current upload processing |
| ${unique_prefix} | A unique 33 character prefix you can use to avoid file name collisions. Example: "f2/d3eeeb67479f11f8b091b04f6181ad" |
| ${previous_step.name} | The name of the previous step that produced the file currently uploaded by the s3 store robot. |
| ${file.name} | The name of the stored file. |
| ${file.url_name} | The name of the stored file stripped from any characters but: A-Za-z0-9-_.. Spaces are replaced with dashes. |
| ${file.*} |
Any file property that is available in the final results array. For example: "${file.meta.width}". Check our
meta data documentation for more information.
|
Demos
- Store the originally uploaded files in your S3 bucket
- Encode a video, extract 8 thumbnails and store everything in your S3 bucket
- Apply a watermark to an image and store this watermarked version and the original uploaded file