Skip to content

Commit

Permalink
upload more than 2 videos at the same time
Browse files Browse the repository at this point in the history
  • Loading branch information
BaderSerhan committed Mar 28, 2019
1 parent 97b23bd commit 9aeb0b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/VydiaRNFileUploader.m
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ - (void)copyAssetToFile: (NSString *)assetUrl completionHandler: (void(^)(NSStri
NSData *httpBody = [self createBodyWithBoundary:uuidStr path:fileURI parameters: parameters fieldName:fieldName];
[request setHTTPBody: httpBody];

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

0 comments on commit 9aeb0b8

Please sign in to comment.