Skip to content

Commit 9aeb0b8

Browse files
committed
upload more than 2 videos at the same time
1 parent 97b23bd commit 9aeb0b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ios/VydiaRNFileUploader.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ - (void)copyAssetToFile: (NSString *)assetUrl completionHandler: (void(^)(NSStri
197197
NSData *httpBody = [self createBodyWithBoundary:uuidStr path:fileURI parameters: parameters fieldName:fieldName];
198198
[request setHTTPBody: httpBody];
199199

200-
// I am sorry about warning, but Upload tasks from NSData are not supported in background sessions.
201-
uploadTask = [[self urlSession] uploadTaskWithRequest:request fromData: nil];
200+
//using uploadTaskWithStreamedRequest instead of uploadTaskWithRequest to ensure more than 2 video uploads at the same time
201+
uploadTask = [[self urlSession] uploadTaskWithStreamedRequest:request];
202202
} else {
203203
if (parameters.count > 0) {
204204
reject(@"RN Uploader", @"Parameters supported only in multipart type", nil);

0 commit comments

Comments
 (0)