|
@@ -11,15 +11,11 @@ const MetaData = require('../../src/plugins/MetaData')
|
|
|
|
|
|
|
|
|
|
|
|
-const RestoreFiles = require('../../src/plugins/RestoreFiles')
|
|
|
+
|
|
|
|
|
|
const PROTOCOL = location.protocol === 'https:' ? 'https' : 'http'
|
|
|
const TUS_ENDPOINT = PROTOCOL + '://master.tus.io/files/'
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
const uppy = Uppy({
|
|
|
debug: true,
|
|
|
autoProceed: false,
|
|
@@ -50,12 +46,12 @@ const uppy = Uppy({
|
|
|
|
|
|
|
|
|
inline: false,
|
|
|
-
|
|
|
-
|
|
|
+ disableStatusBar: false,
|
|
|
+ disableInformer: false,
|
|
|
setMetaFromTargetForm: true,
|
|
|
-
|
|
|
+ replaceTargetContent: true,
|
|
|
target: '.MyForm',
|
|
|
- hideUploadButton: true,
|
|
|
+ hideUploadButton: false,
|
|
|
locale: {
|
|
|
strings: {browse: 'browse'}
|
|
|
}
|
|
@@ -64,14 +60,14 @@ const uppy = Uppy({
|
|
|
|
|
|
.use(Dropbox, {target: Dashboard, host: 'http://localhost:3020'})
|
|
|
.use(Instagram, {target: Dashboard, host: 'http://localhost:3020'})
|
|
|
- .use(Tus10, {endpoint: TUS_ENDPOINT, resume: false})
|
|
|
+ .use(Tus10, {endpoint: TUS_ENDPOINT, resume: true})
|
|
|
.use(MetaData, {
|
|
|
fields: [
|
|
|
{ id: 'license', name: 'License', value: 'Creative Commons', placeholder: 'specify license' },
|
|
|
{ id: 'caption', name: 'Caption', value: 'none', placeholder: 'describe what the image is about' }
|
|
|
]
|
|
|
})
|
|
|
- .use(RestoreFiles, {serviceWorker: true})
|
|
|
+
|
|
|
.run()
|
|
|
|
|
|
uppy.on('core:success', (fileList) => {
|