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 {
3434}
3535
3636const 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
3839const normalizeProgress = ( current , last ) => {
3940 current . totalBytes = Math . max ( current . totalBytes , last . totalBytes ) ;
4041 current . totalPercent = Math . max ( current . totalPercent , last . totalPercent ) ;
@@ -206,6 +207,9 @@ export class Upload extends EventEmitter {
206207
207208 const f = await getFile ( input , this . sanitizerOptions ) ;
208209 f . customName = this . overrideFileName ;
210+ if ( f . size > BIG_FILE_THRESHOLD ) {
211+ this . uploader . setPartSize ( BIG_FILE_THRESHOLD ) ;
212+ }
209213 this . uploader . addFile ( f ) ;
210214
211215 this . startProgressInterval ( ) ;
You can’t perform that action at this time.
0 commit comments