Uppy-1.js
· 542 B · JavaScript
Ham
import Uppy from '@uppy/core'
import Dashboard from '@uppy/dashboard'
import RemoteSources from '@uppy/remote-sources'
import ImageEditor from '@uppy/image-editor'
import Webcam from '@uppy/webcam'
import Tus from '@uppy/tus'
const uppy = new Uppy()
.use(Dashboard, { trigger: '#select-files' })
.use(RemoteSources, { companionUrl: 'https://companion.uppy.io' })
.use(Webcam)
.use(ImageEditor)
.use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })
.on('complete', (result) => {
console.log('Upload result:', result)
})
1 | import Uppy from '@uppy/core' |
2 | import Dashboard from '@uppy/dashboard' |
3 | import RemoteSources from '@uppy/remote-sources' |
4 | import ImageEditor from '@uppy/image-editor' |
5 | import Webcam from '@uppy/webcam' |
6 | import Tus from '@uppy/tus' |
7 | |
8 | const uppy = new Uppy() |
9 | .use(Dashboard, { trigger: '#select-files' }) |
10 | .use(RemoteSources, { companionUrl: 'https://companion.uppy.io' }) |
11 | .use(Webcam) |
12 | .use(ImageEditor) |
13 | .use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' }) |
14 | .on('complete', (result) => { |
15 | console.log('Upload result:', result) |
16 | }) |