Export files to Rackspace Cloud Files
🤖/cloudfiles/store exports encoding results to Rackspace Cloud Files.
A note about URLs
If your container is CDN-enabled, the resulting file.url
indicates the path to the file in your
CDN container, or is null
otherwise.
The storage container URL for this file is always available via file.meta.storage_url
.
Usage example
Export uploaded files to my_target_folder
on Rackspace Cloud Files:
{
"steps": {
"exported": {
"robot": "/cloudfiles/store",
"use": ":original",
"credentials": "YOUR_CLOUDFILES_CREDENTIALS",
"path": "my_target_folder/${unique_prefix}/${file.url_name}"
}
}
}
Parameters
-
use
String / Array of Strings / Object requiredSpecifies which Step(s) to use as input.
-
You can pick any names for Steps except
":original"
(reserved for user uploads handled by Transloadit) -
You can provide several Steps as input with arrays:
"use": [ ":original", "encoded", "resized" ]
💡 That’s likely all you need to know about
use
, but you can view Advanced use cases. -
-
credentials
StringrequiredPlease create your associated Template Credentials in your Transloadit account and use the name of your Template Credentials as this parameter's value. They will contain the values for your Cloud Files Container, User, Key, Account type and Data center.
While we recommend to use Template Credentials at all times, some use cases demand dynamic credentials for which using Template Credentials is too unwieldy because of their static nature. If you have this requirement, feel free to use the following parameters instead:
"account_type"
("us" or "uk"),"data_center"
("dfw" for Dallas or "ord" for Chicago for example),"user"
,"key"
,"container"
. -
path
String ⋅ default:"${file.id}_${file.url_name}"
The path at which to store the file. This value can also contain Assembly variables.
Note: The URLs in the result JSON already point to the file on your target storage platform, so you can just save that URL in your database.
Demos
- Copy files from Amazon S3 to Rackspace Cloud Files
- Store uploaded files in a Rackspace Cloud Files container
Related blog posts
- Transloadit introduces Rackspace Cloud Files support November 11, 2010
- Rapid growth and new features November 12, 2010
- Enhancements: multi-file import & uk rackspace support February 11, 2012
- All Robots now support expanded Assembly Variables April 27, 2012
- New pricing model for future Transloadit customers February 7, 2018