|
@@ -1,17 +1,30 @@
|
|
|
-import Uppy from '../src/core/Core.js'
|
|
|
-import Dashboard from '../src/plugins/Dashboard/index.js'
|
|
|
-import Dummy from '../src/plugins/Dummy.js'
|
|
|
-import GoogleDrive from '../src/plugins/GoogleDrive/index.js'
|
|
|
-import ProgressBar from '../src/plugins/ProgressBar.js'
|
|
|
-import Tus10 from '../src/plugins/Tus10.js'
|
|
|
-import MetaData from '../src/plugins/MetaData.js'
|
|
|
-import Informer from '../src/plugins/Informer.js'
|
|
|
-import Webcam from '../src/plugins/Webcam/index.js'
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
+import { Core,
|
|
|
+ Dummy,
|
|
|
+ Dashboard,
|
|
|
+ GoogleDrive,
|
|
|
+ Webcam,
|
|
|
+
|
|
|
+ ProgressBar,
|
|
|
+ Tus10,
|
|
|
+ MetaData,
|
|
|
+ Informer } from '../src/index.js'
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
-const uppy = new Uppy({debug: true, autoProceed: false})
|
|
|
- .use(Dashboard, {trigger: '#uppyModalOpener'})
|
|
|
+const uppy = new Core({debug: true, autoProceed: false})
|
|
|
+ .use(Dashboard, {trigger: '#uppyModalOpener', inline: false})
|
|
|
.use(GoogleDrive, {target: Dashboard, host: 'http://ya.ru'})
|
|
|
.use(Dummy, {target: Dashboard})
|
|
|
.use(Webcam, {target: Dashboard})
|
|
@@ -21,11 +34,14 @@ const uppy = new Uppy({debug: true, autoProceed: false})
|
|
|
.use(MetaData, {
|
|
|
fields: [
|
|
|
{ id: 'resizeTo', name: 'Resize to', value: 1200, placeholder: 'specify future image size' },
|
|
|
- { id: 'description', name: 'Description', value: '', placeholder: 'describe what the file is for' }
|
|
|
+ { id: 'description', name: 'Description', value: 'none', placeholder: 'describe what the file is for' }
|
|
|
]
|
|
|
})
|
|
|
|
|
|
-
|
|
|
uppy.run()
|
|
|
+
|
|
|
+uppy.on('core:success', (fileCount) => {
|
|
|
+ console.log(fileCount)
|
|
|
+})
|
|
|
|
|
|
document.querySelector('#uppyModalOpener').click()
|