mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-28 20:40:06 +00:00
* Add file.data.relativePath to the file.id * Don’t add/overwrite a file if a file with the same id already exsists, issue a warning * override @uppy/tus fingerprint to uppy’s file.id * combine cordove/react native handling, don’t log twice * always use onError for errors in addFile * use file.meta.relativePath instead of file.data.relativePath what do you think, @lakesare? * update tests to include allowing/diallowing duplicates and file.id generation with relativePath * update tus-js-client * refactor error handling for addFile and upload into a mutual _showOrLogErrorAndThrow method * explain duplicate files and relativePath * throw TypeError vs Error when allowedFileTypes is not an array * fix tests * tweak docs * Emit restriction-failed for all restriction errors, move it to _showOrLogErrorAndThrow |
||
|---|---|---|
| .. | ||
| src | ||
| types | ||
| LICENSE | ||
| package.json | ||
| README.md | ||
@uppy/tus
The Tus plugin brings tus.io resumable file uploading to Uppy by wrapping the tus-js-client.
Uppy is being developed by the folks at Transloadit, a versatile file encoding service.
Example
const Uppy = require('@uppy/core')
const Tus = require('@uppy/tus')
const uppy = Uppy()
uppy.use(Tus, {
endpoint: 'https://master.tus.io/files/', // use your tus endpoint here
resume: true,
autoRetry: true,
retryDelays: [0, 1000, 3000, 5000]
})
Installation
$ npm install @uppy/tus --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.