1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <!doctype html>
- <html lang="en">
- <head>
- <title></title>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <link
- href="https://releases.transloadit.com/uppy/v4.4.0/uppy.min.css"
- rel="stylesheet"
- />
- </head>
- <body>
- <button id="uppyModalOpener">Open Modal</button>
- <noscript>This web page requires JavaScript to work properly.</noscript>
- <script type="module">
- import {
- Uppy,
- Dashboard,
- Instagram,
- GoogleDrive,
- Tus,
- } from 'https://releases.transloadit.com/uppy/v4.4.0/uppy.min.mjs'
- const uppy = new Uppy({ debug: true, autoProceed: false })
- .use(Dashboard, { trigger: '#uppyModalOpener' })
- .use(Instagram, {
- target: Dashboard,
- companionUrl: 'http://localhost:3020',
- })
- .use(GoogleDrive, {
- target: Dashboard,
- companionUrl: 'http://localhost:3020',
- })
- .use(Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })
- uppy.on('success', (fileCount) => {
- console.log(`${fileCount} files uploaded`)
- })
- </script>
- </body>
- </html>
|