[Issue #158] [Issue #163] Fixing error check in appendPartWithFileURL:name:error:. Looking at the documentation for NSURLConnection +sendSynchronousRequest:returningResponse:error:, we don't really need to check error to do the right thing. Therefore, we can get away with checking data and response, and leaving the inclusion of the specified **error as an optional exercise to the user
This commit is contained in:
parent
1822d164d7
commit
8c2304cdfe
1 changed files with 1 additions and 1 deletions
|
|
@ -475,7 +475,7 @@ static inline NSString * AFMultipartFormFinalBoundary() {
|
|||
NSURLResponse *response = nil;
|
||||
NSData *data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:error];
|
||||
|
||||
if (response && !error) {
|
||||
if (data && response) {
|
||||
[self appendPartWithFileData:data name:name fileName:[response suggestedFilename] mimeType:[response MIMEType]];
|
||||
|
||||
return YES;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue