Skip to content

Commit

Permalink
Merge pull request #135 from BaderSerhan/master
Browse files Browse the repository at this point in the history
upload more than 2 videos at the same time
  • Loading branch information
StevePotter committed Apr 16, 2019
2 parents 97b23bd + 9aeb0b8 commit a4014c7
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 a4014c7

Please sign in to comment.