Reputation: 11
I find it easy to upload an image with Alamofire.upload(.POST, uploadURL , fileURL) and send a post request including json with Alamofire.request(.POST, url, parameters: params,encoding:.JSON) But how can I send a post request including image and json at the same time? can any one please help me on this issue? Thank U! :)
Upvotes: 1
Views: 3494
Reputation: 855
Here's the solution to your problem that I posted on another question. Instead of copy and pasting everything, just check it out here. Basically, it provides a simple function which you can use to create the URLRequestConvertible and NSData that Alamofire.upload requires. There's also a quick example and php upload script if you need. Good luck!
Upvotes: 2