1

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! :)

freddie
  • 11
  • 1
  • 3

1 Answers1

2

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!

Community
  • 1
  • 1
antiblank
  • 855
  • 5
  • 8