Skip to content

Commit a4014c7

Browse files
authored
Merge pull request #135 from BaderSerhan/master
upload more than 2 videos at the same time
2 parents 97b23bd + 9aeb0b8 commit a4014c7

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)