Ver Fonte

companion: overwrite bytestotal for only tus uploads

Ifedapo Olarewaju há 6 anos atrás
pai
commit
d9ec8d28f4
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      packages/@uppy/companion/src/server/Uploader.js

+ 1 - 1
packages/@uppy/companion/src/server/Uploader.js

@@ -225,7 +225,7 @@ class Uploader {
    */
   emitProgress (bytesUploaded, bytesTotal) {
     bytesTotal = bytesTotal || this.options.size
-    if (this.tus.options.uploadLengthDeferred && this.streamsEnded) {
+    if (this.tus && this.tus.options.uploadLengthDeferred && this.streamsEnded) {
       bytesTotal = this.bytesWritten
     }
     const percentage = (bytesUploaded / bytesTotal * 100)