I'm trying upload image to server using AFNetworking with PUT request.-
     UIImage* snap = info[UIImagePickerControllerOriginalImage];
      NSData *imageData = UIImageJPEGRepresentation(snap, 0.3);
      NSMutableString * fullPath = [NSMutableString stringWithString:API_BASE_URL];
    [fullPath appendFormat:@"%@%@",API_VERSION,req];
    NSURL * url = [NSURL URLWithString:fullPath];
   AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:url];
    [manager.requestSerializer setValue:[NSString stringWithFormat:@"%@", @kPublicKey] forHTTPHeaderField:@"X-API-KEY"];
    [manager.requestSerializer setValue:bodyStr forHTTPHeaderField:@"X-API-DATA"];
    NSString *URLString = fullPath;
    NSMutableURLRequest *request = [manager.requestSerializer multipartFormRequestWithMethod:@"PUT" URLString:URLString parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
        [formData appendPartWithFileData:imageData name:@"media" fileName:@"upload.jpg" mimeType:@"image/jpeg"];
    } error:nil];
   AFHTTPRequestOperation *requestOperation = [manager HTTPRequestOperationWithRequest:request success:^(AFHTTPRequestOperation *operation, id responseObject) {
      //success
    } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
         NSLog(@"failure...");
    }];
    [requestOperation start];
I'm taking image using iPhone camera and upload it to server but it takes too much time to process and images uploaded on server are in huge size(~10-12MB) although i'm trying to compress the image? What i'm doing wrong?Any suggestion or sample code would be appreciated.
 
     
    