transloadit-preset-upload.md 1.2 KB


type: docs title: "Transloadit Wrapper: Upload API" menu: "Upload" permalink: docs/transloadit-wrapper/upload/

order: 13

Upload files straight to Transloadit from your own custom UI. Give us an array of files, and we'll give you an array of results!

const resultPromise = transloadit.upload(files, {
  params: {
    auth: { key: '' },
    template_id: ''
  }
})

resultPromise is a Promise that resolves with an object:

  • successful - An array containing data about files that were uploaded successfully
  • failed - An array containing data about files that failed to upload
  • transloadit - An array of Assembly statuses

files

An array of File objects, obtained from an <input type="file"> or elsewhere.

These can also be Blobs with a .name property. That way you can upload files that were created using JavaScript.

Transloadit

TODO inline most of this?

All the options to the Transloadit plugin are supported.