ios - How to upload hundreds of pictures by AFNetworking? -


i upload pictures, ranging few hundred 1000, using afnetwoking methods, there drawback, reads image data 1 time, memory up,for example:

nsoperationqueue *operationqueue = [[nsoperationqueue alloc]init]; [operationqueue setmaxconcurrentoperationcount:1];  (nsurl *fileurl in filestoupload) {       nsurlrequest *request = [[afhttprequestserializer serializer] multipartformrequestwithmethod:@"post"          urlstring:@"http://example.com/upload" parameters:nil         constructingbodywithblock:^(id<afmultipartformdata> formdata) {             [formdata appendpartwithfileurl:fileurl name:@"images[]" error:nil];        }];         afhttprequestoperation *operation = [[afhttprequestoperation alloc] initwithrequest:request];        [operationqueue addoperation:operation]; } 

this read pictures's data before upload, how can create queue reduced memory consumption


Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

wso2esb - How to concatenate JSON array values in WSO2 ESB? -