Artur Paikin d3c52eedde add core styles to Robodog 6 years ago
..
src d3c52eedde add core styles to Robodog 6 years ago
LICENSE 6376d68fd5 robodoggo 6 years ago
README.md 6376d68fd5 robodoggo 6 years ago
bundle.js 6376d68fd5 robodoggo 6 years ago
package.json f94bc77deb Publish 6 years ago

README.md

@uppy/transloadit

Build Status

The Transloadit plugin can be used to upload files to Transloadit for all kinds of processing, such as transcoding video, resizing images, zipping/unzipping, and more.

Try it live →

Uppy is being developed by the folks at Transloadit, a versatile file encoding service.

Example

transloadit.form attaches Transloadit to an existing HTML form. It could act like the jQuery SDK using the @uppy/file-input plugin, or it could also add the @uppy/dashboard. Uploads files on form submission, adds results to a hidden input, then really submits the form.

const transloadit = require('@uppy/robodog')

transloadit.form('#form', {
  params: {
    auth: { key: '' },
    template_id: ''
  }
})

Adding Dashboard could be optional, eg

transloadit.form('#form', {
  ...
  dashboard: true // or css selector, true means input[type=file]
})

The file input would be replaced by a button that opens the dashboard modal. Needs:

  • a way of having a 'Done' button instead of 'Upload' that closes the modal but doesn't trigger upload.

transloadit.modal opens the Dashboard and allows the user to select files. When the user is done, presses 'upload', files are uploaded and the modal closes. Promise resolves with results.

Needs:

  • {multi: false} option in core, so that no new files can be added once upload() was called
  • {autoClose: true} option in dashboard, that closes it once upload is complete
transloadit.modal({
  params: {
    auth: { key: '' },
    template_id: ''
  }
}).then(({ successful, failed }) => {
  // successful, failed are uppy.upload() result
  // perhaps it could be assembly status or assembly results instead
})

Installation

$ npm install @uppy/transloadit --save

We recommend installing from npm and then using a module bundler such as Webpack, Browserify or Rollup.js.

Alternatively, you can also use this plugin in a pre-built bundle from Transloadit's CDN: Edgly. In that case Uppy will attach itself to the global window.Uppy object. See the main Uppy documentation for instructions.

Documentation

Documentation for this plugin can be found on the Uppy website.

License

The MIT License.