type: docs title: "Transloadit Wrapper: Upload API" menu: "Upload" permalink: docs/transloadit-wrapper/upload/
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 successfullyfailed
- An array containing data about files that failed to uploadtransloadit
- An array of Assembly statusesfiles
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.
TODO inline most of this?
All the options to the Transloadit plugin are supported.