uppy/website/src/api-usage-example.ejs
2016-10-21 18:46:30 -04:00

12 lines
362 B
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Core, DragDrop, ProgressBar, Tus10 } from 'uppy'
 
const uppy = new Core({autoProceed: false})
uppy
.use(DragDrop, {target: '#drop-target'})
.use(ProgressBar, {target: 'body'})
.use(Tus10, {endpoint: '//tusd.tus.io/files'})
.run()
 
uppy.on('core:success', (fileCount) => {
console.log(`Upload complete. We uploaded ${fileCount} files!`)
})