Forráskód Böngészése

we have to use new keyword before Uppy.Core() now

Artur Paikin 3 éve
szülő
commit
51037514e5

+ 1 - 1
BUNDLE-README.md

@@ -30,7 +30,7 @@ Now you can create an HTML file, e.g.: `./upload.html` with the following conten
 
 <script src="./js/uppy/uppy.min.js"></script>
 <script>
-  var uppy = Uppy.Core({
+  var uppy = new Uppy.Core({
     debug      : true,
     autoProceed: false,
   })

+ 1 - 1
README.md

@@ -85,7 +85,7 @@ Alternatively, you can also use a pre-built bundle from Transloadit's CDN: Edgly
 <!-- 3. Initialize -->
 <div class="UppyDragDrop"></div>
 <script>
-  var uppy = Uppy.Core()
+  var uppy = new Uppy.Core()
   uppy.use(Uppy.DragDrop, { target: '.UppyDragDrop' })
   uppy.use(Uppy.Tus, { endpoint: '//tusd.tusdemo.net/files/' })
 </script>

+ 1 - 1
examples/cdn-example/index.html

@@ -10,7 +10,7 @@
     <button id="uppyModalOpener">Open Modal</button>
     <script src="https://releases.transloadit.com/uppy/v2.0.0/uppy.min.js"></script>
     <script>
-      const uppy = Uppy.Core({debug: true, autoProceed: false})
+      const uppy = new Uppy.Core({debug: true, autoProceed: false})
         .use(Uppy.Dashboard, { trigger: '#uppyModalOpener' })
         .use(Uppy.Webcam, {target: Uppy.Dashboard})
         .use(Uppy.Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })

+ 1 - 1
examples/uppy-with-companion/client/index.html

@@ -10,7 +10,7 @@
     <button id="uppyModalOpener">Open Modal</button>
     <script src="https://releases.transloadit.com/uppy/v2.0.0/uppy.min.js"></script>
     <script>
-      const uppy = Uppy.Core({debug: true, autoProceed: false})
+      const uppy = new Uppy.Core({debug: true, autoProceed: false})
         .use(Uppy.Dashboard, { trigger: '#uppyModalOpener' })
         .use(Uppy.Instagram, { target: Uppy.Dashboard, companionUrl: 'http://localhost:3020' })
         .use(Uppy.GoogleDrive, { target: Uppy.Dashboard, companionUrl: 'http://localhost:3020' })

+ 2 - 2
website/src/docs/index.md

@@ -26,7 +26,7 @@ Here’s the simplest example html page with Uppy (it uses a CDN bundle, while w
 
     <script src="https://releases.transloadit.com/uppy/v2.0.0/uppy.min.js"></script>
     <script>
-      var uppy = Uppy.Core()
+      var uppy = new Uppy.Core()
         .use(Uppy.Dashboard, {
           inline: true,
           target: '#drag-drop-area'
@@ -130,7 +130,7 @@ You can also use a pre-built bundle from Transloadit's CDN: Edgly. `Uppy` will a
 
 ``` html
 <script>
-  var uppy = Uppy.Core()
+  var uppy = new Uppy.Core()
   uppy.use(Uppy.DragDrop, { target: '#drag-drop-area' })
   uppy.use(Uppy.Tus, { endpoint: 'https://tusd.tusdemo.net/files/' })
 </script>

+ 1 - 1
website/src/docs/locales.md

@@ -38,7 +38,7 @@ Add a `<script>` tag with Uppy bundle and the locale pack you’d like to use. Y
 <script src="https://releases.transloadit.com/uppy/locales/v2.0.0/de_DE.min.js"></script>
 
 <script>
-var uppy = Uppy.Core({
+var uppy = new Uppy.Core({
   debug: true,
   locale: Uppy.locales.de_DE
 })

+ 1 - 1
website/src/examples/i18n/app.html

@@ -15,7 +15,7 @@
 <script src="https://releases.transloadit.com/uppy/v2.0.0/uppy.min.js"></script>
 <script src="https://releases.transloadit.com/uppy/locales/v2.0.0/ru_RU.min.js"></script>
 <script>
-  var uppy = Uppy.Core({
+  var uppy = new Uppy.Core({
     debug: true,
     autoProceed: true,
     locale: Uppy.locales.ru_RU