File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ export interface ProgressEvent {
34
34
}
35
35
36
36
const DEFAULT_PROGRESS_INTERVAL = 1000 ;
37
-
37
+ const BIG_FILE_THRESHOLD = 50 * 1000 * 1000 * 1000 // 50GB
38
+ const BIG_FILE_PART_SIZE = 10 * 1024 * 1024 ; // 10MB
38
39
const normalizeProgress = ( current , last ) => {
39
40
current . totalBytes = Math . max ( current . totalBytes , last . totalBytes ) ;
40
41
current . totalPercent = Math . max ( current . totalPercent , last . totalPercent ) ;
@@ -206,6 +207,9 @@ export class Upload extends EventEmitter {
206
207
207
208
const f = await getFile ( input , this . sanitizerOptions ) ;
208
209
f . customName = this . overrideFileName ;
210
+ if ( f . size > BIG_FILE_THRESHOLD ) {
211
+ this . uploader . setPartSize ( BIG_FILE_THRESHOLD ) ;
212
+ }
209
213
this . uploader . addFile ( f ) ;
210
214
211
215
this . startProgressInterval ( ) ;
You can’t perform that action at this time.
0 commit comments