Skip to content

Commit

Permalink
remove unnecessary coment
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Potter committed Apr 16, 2019
1 parent a4014c7 commit f649414
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ios/VydiaRNFileUploader.m
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ - (void)copyAssetToFile: (NSString *)assetUrl completionHandler: (void(^)(NSStri
if (requestUrl == nil) {
@throw @"Request cannot be nil";
}

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:requestUrl];
[request setHTTPMethod: method];

Expand Down Expand Up @@ -197,14 +197,13 @@ - (void)copyAssetToFile: (NSString *)assetUrl completionHandler: (void(^)(NSStri
NSData *httpBody = [self createBodyWithBoundary:uuidStr path:fileURI parameters: parameters fieldName:fieldName];
[request setHTTPBody: httpBody];

//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);
return;
}

uploadTask = [[self urlSession] uploadTaskWithRequest:request fromFile:[NSURL URLWithString: fileURI]];
}

Expand Down

0 comments on commit f649414

Please sign in to comment.