In this tutorial we will upload the image as a file to JSON server .
For uploading image as a file we use multipart form as our content type .
Now jumping straightforward to our code .
Step 1 : Add AFNetworking framework to your project .
How to add AFNetworking to your project ?
Visit my previous post on AFNetworking .
Step 2: Import AFNetworking to your project.
Step 3: Add the following code in viewDidLoad to upload image as a file :
Thats all about file uploading in iOS .
Thank you :) .