I am trying to upload an image to an Amazon EC2 server using AFNetworking for an iOS app. In my research I found this following line to use from here:
[manager POST:@"http://example.com/resources.json" parameters:parameters constructingBodyWithBlock:^(id<AFMultipartFormData> formData) {
[formData appendPartWithFormData:imageData name:@"image"];
} success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"Success: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
May I know what do I insert accordingly for "parameters"? Is "parameters" the authenticating key between the app and my server? I have an AppKeyPair.pem from the server instance and a username/password to connect to the instance via a remote desktop.