File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,16 @@ export class ProgressiveUploader extends AbstractUploader<ProgressiveProgressEve
37
37
}
38
38
39
39
public uploadPart ( file : Blob ) : Promise < void > {
40
+ if ( ! this . mergeSmallPartsBeforeUpload && file . size < MIN_CHUNK_SIZE ) {
41
+ throw new Error ( `Each part must have a minimal size of 5MB. The current part has a size of ${ this . currentPartBlobsSize / 1024 / 1024 } MB.` )
42
+ }
40
43
this . currentPartBlobsSize += file . size ;
41
44
this . currentPartBlobs . push ( file ) ;
42
45
43
46
if ( ( this . preventEmptyParts && ( this . currentPartBlobsSize - file . size >= MIN_CHUNK_SIZE ) )
44
47
|| ( ! this . preventEmptyParts && ( this . currentPartBlobsSize >= MIN_CHUNK_SIZE ) )
45
48
|| ( ! this . mergeSmallPartsBeforeUpload ) ) {
46
49
47
- if ( ! this . mergeSmallPartsBeforeUpload && this . currentPartBlobsSize < MIN_CHUNK_SIZE ) {
48
- throw new Error ( `Each part must have a minimal size of 5MB. The current part has a size of ${ this . currentPartBlobsSize / 1024 / 1024 } MB.` )
49
- }
50
50
let toSend : any [ ] ;
51
51
if ( this . preventEmptyParts ) {
52
52
toSend = this . currentPartBlobs . slice ( 0 , - 1 ) ;
You can’t perform that action at this time.
0 commit comments