main.js 508 B

12345678910111213141516171819202122232425
  1. import Uppy from '@uppy/core'
  2. import Dashboard from '@uppy/dashboard'
  3. import XHRUpload from '@uppy/xhr-upload'
  4. import '@uppy/core/dist/style.css'
  5. import '@uppy/dashboard/dist/style.css'
  6. const uppy = new Uppy({
  7. debug: true,
  8. meta: { something: 'xyz' },
  9. })
  10. uppy.use(Dashboard, {
  11. target: '#app',
  12. inline: true,
  13. hideRetryButton: true,
  14. hideCancelButton: true,
  15. })
  16. uppy.use(XHRUpload, {
  17. bundle: true,
  18. endpoint: 'http://localhost:9967/upload',
  19. metaFields: ['something'],
  20. fieldName: 'files',
  21. })