
Handle uploads
🤖/upload/handle receives uploads that your users throw at you from browser or apps, or that you throw at us programmatically.
Transloadit will handle file uploads for you whether you specify this Robot or not, so using it is optional.
It can still be good to define this Robot to make your Assembly Instructions explicit though, and to configure how exactly uploads should be handled. For example, what metadata we should extract for uploaded files?
There are three constraints when using this Robot. You must:
- Not define a
use
parameter, contrary to all other Robots. - Only use it once in a single set of Assembly Instructions.
- Name the Step that it's used in:
:original
.
For example:
{
"steps": {
":original": {
"robot": "/upload/handle",
"output_meta": {
"has_transparency": true
}
},
"exported": {
"robot": "/s3/store",
"use": ":original",
"credentials": "YOUR_S3_CREDENTIALS"
}
}
}
Parameters
-
output_meta
Object / Boolean ⋅ default:{}
Allows you to specify a set of metadata that is more expensive on CPU power to calculate, and thus is disabled by default to keep your Assemblies processing fast.
For images, you can add
"has_transparency": true
in this object to extract if the image contains transparent parts and"dominant_colors": true
to extract an array of hexadecimal color codes from the image.For videos, you can add the
"colorspace: true"
parameter to extract the colorspace of the output video.For audio, you can add
"mean_volume": true
to get a single value representing the mean average volume of the audio file.You can also set this to
false
to skip metadata extraction and speed up transcoding.
Related blog posts
- Raising prices (for new customers) February 7, 2018
- An introduction to the Subtitle Robot December 6, 2018
- Re-loadit: the /upload/handle Robot February 13, 2019
- How to filter input files using the /file/filter and /file/virusscan Robots February 6, 2019
- Re-loadit: the /google/store Robot March 1, 2019
- The importance of a watermark: new watermark parameters February 20, 2019
- Introducing the output_meta parameter March 20, 2019
- Tutorial: Using /video/merge to develop video slideshows June 14, 2019
- Add real-time video uploading to a site without writing code, with Bubble.is and Transloadit August 2, 2019
- Automatically transcribe video files March 8, 2021
- Introducing the OCR Robot August 26, 2021
- Let's Build: a video from album art October 10, 2021