Uploading large files with AFNetworking?
I'm working on an application that generates large files (100Mb +) that I would like to upload to a web server.
By loading the file into an NSData object that will kill the application due to memory usage (this is the only way I can see in the AFNetworking docs), is there any other way to send the file along with maybe 10 other field forms?
Thank you in advance
+3
source to share
3 answers
Uploading a large file using AFNetworking you need to use
- (NSMutableURLRequest *)multipartFormRequestWithMethod:(NSString *)method
path:(NSString *)path
parameters:(NSDictionary *)parameters
constructingBodyWithBlock:(void (^)(id <AFMultipartFormData> " formData))block;
of AFHttpClient
or you can check this link for your custom implementation for PostController:
http://developer.apple.com/library/ios/#samplecode/SimpleURLConnections/Introduction/Intro.html
0
source to share