Browse Source

chore: send file size to uppy server

Ifedapo Olarewaju 8 years ago
parent
commit
98e1a63b00
2 changed files with 3 additions and 2 deletions
  1. 1 1
      example/main.js
  2. 2 1
      src/plugins/Tus10.js

+ 1 - 1
example/main.js

@@ -27,7 +27,7 @@ const uppy = Uppy({debug: true, autoProceed: false})
       strings: {browse: 'wow'}
     }
   })
-  .use(GoogleDrive, {target: Dashboard, host: 'https://server.uppy.io'})
+  .use(GoogleDrive, {target: Dashboard, host: 'http://localhost:3020'})
   .use(Dropbox, {target: Dashboard, host: 'http://localhost:3020'})
   // .use(FileInput, {target: '.Uppy', locale: {
   //   strings: {selectToUpload: 'хуй'}

+ 2 - 1
src/plugins/Tus10.js

@@ -151,7 +151,8 @@ module.exports = class Tus10 extends Plugin {
         },
         body: JSON.stringify(Object.assign({}, file.remote.body, {
           endpoint: this.opts.endpoint,
-          protocol: 'tus'
+          protocol: 'tus',
+          size: file.data.size
         }))
       })
       .then((res) => {