Transloadit

  • Useful for large files like videos

  • Download, Upload, transcode, and push to an S3/server

Basics

You create a template that has a JSON describing the list of steps or robots and their settings

Use the opensource tool Uppyarrow-up-right to upload files, comes with nice upload UI for different sources even GDrive and camera out of the box

Use Robodogarrow-up-right, the uppy based library to talk to Transloadit API

import Robodog from "@uppy/robodog";

const resultPromise = Robodog.upload(files, {
  params: {
    auth: { key: "3.dsafkjads.adsf.afds.adsf.." },
    steps: {
      ":original": {
        robot: "/upload/handle",
      },
      export: {
        use: ":original",
        robot: "/s3/store",
        credentials: "eta-aws",
        //\$ for translodits string stuff url_name is url encoded name with extension
        path: `${new Date().toISOString()}-\${file.url_name}`,
      },
    },
  },
});

resultPromise.then((bundle) => {
  bundle.transloadit // Array of Assembly statuses

})

Templates

Here is a basic template to output .webm

Can use assembly variables like ${fields.*} if uppy was set to allow it

Then credientials should be set in template credentials

Last updated