Export files to Tus-compatible servers
🤖/tus/store exports encoding results to any Tus-compatible server.
Usage example
Export uploaded files to the Tus live demo server:
{
"steps": {
"exported": {
"robot": "/tus/store",
"use": ":original",
"endpoint": "https://tusd.tusdemo.net/files/"
}
}
}
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. -
-
endpoint
StringrequiredThe URL of the Tus-compatible server, which you're uploading files to.
-
credentials
StringCreate Template Credentials for this Robot in your Transloadit account and use the name of the Template Credentials as this parameter's value. For this Robot, use the HTTP template, which allows request headers to be passed along to the destination server.
-
headers
Object ⋅ default:{}
Optional extra headers outside of the Template Credentials can be passed along within this parameter.
Although, we recommend to exclusively use Template Credentials, this may be necessary if you're looking to use dynamic credentials, which isn't a feature supported by Template Credentials.
-
metadata
Object ⋅ default:{ "filename": "example.png", "basename": "example", "extension": "png" }
Metadata to pass along to destination. Includes some file info by default.
-
url_template
StringThe URL of the file in the Assembly Status JSON. The following Assembly Variables are supported. If this is not specified, the upload URL specified by the destination server will be used instead.
-
ssl_url_template
StringThe SSL URL of the file in the Assembly Status JSON. The following Assembly Variables are supported. If this is not specified, the upload URL specified by the destination server will be used instead, as long as it starts with
https
.
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 Azure to Tus servers
- Copy files from Backblaze to Tus servers
- Copy files from DigitalOcean Spaces to Tus servers
- Copy files from Dropbox to Tus servers
- Copy files from FTP servers to Tus servers
- Copy files from Google Storage to Tus servers
- Copy files from MinIO to Tus servers
- Copy files from Openstack/Swift to Tus servers
- Copy files from Rackspace Cloud Files to Tus servers
- Copy files from SFTP servers to Tus servers
- Copy files from Supabase to Tus servers
- Copy files from Wasabi to Tus servers
- Copy files from Webservers to Tus servers
- Copy files from cloudflare to Tus servers
Related blog posts
- Introducing the /tus/store Robot for secure file storage January 15, 2024