You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
Repository navigation
Commit f666842
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -662,7 +638,7 @@ export class Upload extends Pumpify {
662
638
// Check if the offset (server) is too far behind the current stream
663
639
if(this.offset<this.numBytesWritten){
664
640
constdelta=this.numBytesWritten-this.offset;
665
-
constmessage=`The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${delta} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`;
641
+
constmessage=`The offset is lower than the number of bytes written. The server has ${this.offset} bytes and while ${this.numBytesWritten} bytes has been uploaded - thus ${delta} bytes are missing. Stopping as this could result in data loss. Initiate a new upload to continue.`;
666
642
667
643
this.emit('error',newRangeError(message));
668
644
return;
@@ -811,7 +787,7 @@ export class Upload extends Pumpify {
811
787
};
812
788
this.destroy(err);
813
789
}else{
814
-
// remove the last chunk sent
790
+
// remove the last chunk sent to free memory
815
791
this.lastChunkSent=Buffer.alloc(0);
816
792
817
793
if(resp&&resp.data){
@@ -822,7 +798,7 @@ export class Upload extends Pumpify {
822
798
823
799
// Allow the object (Upload) to continue naturally so the user's
824
800
// "finish" event fires.
825
-
this.emit('prepareFinish');
801
+
this.emit('uploadFinished');
826
802
}
827
803
}
828
804
@@ -902,10 +878,6 @@ export class Upload extends Pumpify {
902
878
}
903
879
904
880
// this resumable upload is unrecoverable (bad data or service error).
0 commit comments