Browse Source

Resolved a conflict

Artur Paikin 9 years ago
parent
commit
1646dcc3fe
3 changed files with 7 additions and 6 deletions
  1. 3 2
      src/plugins/Tus10.js
  2. 3 3
      website/_config.yml
  3. 1 1
      website/src/examples/dragdrop/app.es6

+ 3 - 2
src/plugins/Tus10.js

@@ -29,6 +29,7 @@ export default class Tus10 extends Plugin {
 
   upload(file, current, total) {
     // Create a new tus upload
+    var self   = this;
     var upload = new tus.Upload(file, {
       endpoint: this.opts.endpoint,
       onError: function (error) {
@@ -36,10 +37,10 @@ export default class Tus10 extends Plugin {
       },
       onProgress: function (bytesUploaded, bytesTotal) {
         var percentage = (bytesUploaded / bytesTotal * 100).toFixed(2);
-        this.setProgress(percentage, current, total);
+        self.setProgress(percentage, current, total);
       },
       onSuccess: function () {
-        console.log('Download %s from %s', upload.file.name, upload.url);
+        console.log(`Download ${upload.file.name} from ${upload.url}`);
         return Promise.resolve(upload);
       }
     });

+ 3 - 3
website/_config.yml

@@ -5,9 +5,9 @@
 # Uppy versions, auto updated by update.js
 uppy_version: 0.0.1
 
-uppy_dev_size: "79.21"
-uppy_min_size: "79.21"
-uppy_gz_size: "79.21"
+uppy_dev_size: "79.24"
+uppy_min_size: "79.24"
+uppy_gz_size: "79.24"
 
 # Theme
 google_analytics: UA-63083-12

+ 1 - 1
website/src/examples/dragdrop/app.es6

@@ -4,7 +4,7 @@ import { DragDrop, Tus10 } from 'uppy/plugins';
 const uppy = new Uppy({wait: false});
 const files = uppy
   .use(DragDrop, {selector: '#upload-target'})
-  .use(Tus10, {endpoint: 'http://master.tus.io:8080'})
+  .use(Tus10, {endpoint: 'http://master.tus.io:8080/files/'})
   .run();
 
 console.log('Uppy ' + uppy.type + ' loaded');