|
@@ -3,9 +3,6 @@ const React = require('react')
|
|
|
const Uppy = require('uppy/lib/core')
|
|
|
const Tus10 = require('uppy/lib/plugins/Tus10')
|
|
|
const GoogleDrive = require('uppy/lib/plugins/GoogleDrive')
|
|
|
-const DashboardPlugin = require('uppy/lib/plugins/Dashboard')
|
|
|
-const DragDropPlugin = require('uppy/lib/plugins/DragDrop')
|
|
|
-const ProgressBarPlugin = require('uppy/lib/plugins/ProgressBar')
|
|
|
const { Dashboard, DashboardModal, DragDrop, ProgressBar } = require('uppy/lib/react')
|
|
|
|
|
|
module.exports = class App extends React.Component {
|
|
@@ -22,22 +19,12 @@ module.exports = class App extends React.Component {
|
|
|
|
|
|
componentWillMount () {
|
|
|
this.uppy = new Uppy({ autoProceed: false })
|
|
|
- .use(Tus10, { endpoint: 'https://master.tus.io/files' })
|
|
|
- .use(DragDropPlugin, {
|
|
|
- locale: {
|
|
|
- strings: {
|
|
|
- chooseFile: 'Boop a file',
|
|
|
- orDragDrop: 'or yoink it here'
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- .use(ProgressBarPlugin)
|
|
|
+ .use(Tus10, { endpoint: 'https://master.tus.io/files/' })
|
|
|
.use(GoogleDrive, { host: 'https://server.uppy.io' })
|
|
|
.run()
|
|
|
|
|
|
this.uppy2 = new Uppy({ autoProceed: false })
|
|
|
- .use(Tus10, { endpoint: 'https://master.tus.io/files' })
|
|
|
- .use(DashboardPlugin)
|
|
|
+ .use(Tus10, { endpoint: 'https://master.tus.io/files/' })
|
|
|
.run()
|
|
|
}
|
|
|
|
|
@@ -91,10 +78,20 @@ module.exports = class App extends React.Component {
|
|
|
</div>
|
|
|
|
|
|
<h2>Drag Drop Area</h2>
|
|
|
- <DragDrop uppy={this.uppy} />
|
|
|
+ <DragDrop
|
|
|
+ uppy={this.uppy}
|
|
|
+ locale={{
|
|
|
+ strings: {
|
|
|
+ chooseFile: 'Boop a file',
|
|
|
+ orDragDrop: 'or yoink it here'
|
|
|
+ }
|
|
|
+ }}
|
|
|
+ />
|
|
|
|
|
|
<h2>Progress Bar</h2>
|
|
|
- <ProgressBar uppy={this.uppy} />
|
|
|
+ <ProgressBar
|
|
|
+ uppy={this.uppy}
|
|
|
+ />
|
|
|
</div>
|
|
|
)
|
|
|
}
|