main.js 604 B

123456789101112131415161718192021222324252627282930
  1. const Uppy = require('@uppy/core')
  2. const Dashboard = require('@uppy/dashboard')
  3. const GoldenRetriever = require('@uppy/golden-retriever')
  4. // Initialise two Uppy instances with the GoldenRetriever plugin,
  5. // but with different `id`s.
  6. const a = Uppy({
  7. id: 'a',
  8. debug: true
  9. })
  10. .use(Dashboard, {
  11. target: '#a',
  12. inline: true,
  13. width: 400
  14. })
  15. .use(GoldenRetriever, { serviceWorker: false })
  16. const b = Uppy({
  17. id: 'b',
  18. debug: true
  19. })
  20. .use(Dashboard, {
  21. target: '#b',
  22. inline: true,
  23. width: 400
  24. })
  25. .use(GoldenRetriever, { serviceWorker: false })
  26. window.a = a
  27. window.b = b