uppy/examples/custom-provider/client/main.js
2022-07-04 14:06:36 +02:00

28 lines
631 B
JavaScript

import Uppy from '@uppy/core'
import GoogleDrive from '@uppy/google-drive'
import Tus from '@uppy/tus'
import Dashboard from '@uppy/dashboard'
import MyCustomProvider from './MyCustomProvider.jsx'
import '@uppy/core/dist/style.css'
import '@uppy/dashboard/dist/style.css'
const uppy = new Uppy({
debug: true,
})
uppy.use(GoogleDrive, {
companionUrl: 'http://localhost:3020',
})
uppy.use(MyCustomProvider, {
companionUrl: 'http://localhost:3020',
})
uppy.use(Dashboard, {
inline: true,
target: 'body',
plugins: ['GoogleDrive', 'MyCustomProvider'],
})
uppy.use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })