Artur Paikin 7 роки тому
батько
коміт
5ba2ef0eee
1 змінених файлів з 7 додано та 16 видалено
  1. 7 16
      examples/cdn-example/index.html

+ 7 - 16
examples/cdn-example/index.html

@@ -10,27 +10,18 @@
     <button id="uppyModalOpener">Open Modal</button>
     <script src="https://unpkg.com/uppy/dist/uppy.min.js"></script>
     <script>
-      const Dashboard = Uppy.Dashboard
-      const Webcam = Uppy.Webcam
-      const Tus = Uppy.Tus
-      const Informer = Uppy.Informer
-
       const uppy = Uppy.Core({debug: true, autoProceed: false})
-      .use(Uppy.Dashboard, {
-        trigger: '#uppyModalOpener',
-        target: 'body'
-      })
-      .use(Webcam, {target: Dashboard})
-      .use(Tus, {endpoint: 'https://master.tus.io/files/', resume: true})
-      .use(Informer, {target: Dashboard})
-
-      uppy.run()
+        .use(Uppy.Dashboard, {
+          trigger: '#uppyModalOpener',
+          target: 'body'
+        })
+        .use(Uppy.Webcam, {target: Dashboard})
+        .use(Uppy.Tus, { endpoint: 'https://master.tus.io/files/', resume: true })
+        .run()
 
       uppy.on('success', (fileCount) => {
         console.log(`${fileCount} files uploaded`)
       })
-
-      document.querySelector('#uppyModalOpener').click()
     </script>
   </body>
 </html>