|
@@ -38,33 +38,33 @@ function uppyInit () {
|
|
|
target: opts.DashboardInline ? '.DashboardContainer' : 'body',
|
|
|
note: opts.restrictions ? 'Images and video only, 2–3 files, up to 1 MB' : '',
|
|
|
metaFields: [
|
|
|
- { id: 'license', name: 'License', value: 'Creative Commons', placeholder: 'specify license' },
|
|
|
- { id: 'caption', name: 'Caption', value: '', placeholder: 'describe what the image is about' }
|
|
|
+ { id: 'license', name: 'License', placeholder: 'specify license' },
|
|
|
+ { id: 'caption', name: 'Caption', placeholder: 'describe what the image is about' }
|
|
|
]
|
|
|
})
|
|
|
|
|
|
if (opts.GoogleDrive) {
|
|
|
- uppy.use(GoogleDrive, {target: Dashboard, host: UPPY_SERVER})
|
|
|
+ uppy.use(GoogleDrive, { target: Dashboard, host: UPPY_SERVER })
|
|
|
}
|
|
|
|
|
|
if (opts.Dropbox) {
|
|
|
- uppy.use(Dropbox, {target: Dashboard, host: UPPY_SERVER})
|
|
|
+ uppy.use(Dropbox, { target: Dashboard, host: UPPY_SERVER })
|
|
|
}
|
|
|
|
|
|
if (opts.Instagram) {
|
|
|
- uppy.use(Instagram, {target: Dashboard, host: UPPY_SERVER})
|
|
|
+ uppy.use(Instagram, { target: Dashboard, host: UPPY_SERVER })
|
|
|
}
|
|
|
|
|
|
if (opts.Webcam) {
|
|
|
- uppy.use(Webcam, {target: Dashboard})
|
|
|
+ uppy.use(Webcam, { target: Dashboard })
|
|
|
}
|
|
|
|
|
|
- uppy.use(Tus, {endpoint: TUS_ENDPOINT, resume: true})
|
|
|
+ uppy.use(Tus, { endpoint: TUS_ENDPOINT, resume: true })
|
|
|
uppy.run()
|
|
|
|
|
|
- uppy.on('complete', (result) => {
|
|
|
- console.log('Yo, uploaded: ')
|
|
|
- console.log(result.successful)
|
|
|
+ uppy.on('complete', result => {
|
|
|
+ console.log('successful files:', result.successful)
|
|
|
+ console.log('failed files:', result.failed)
|
|
|
})
|
|
|
}
|
|
|
|