Upload Image From iOS App Using Alamofire
1 min readJun 2, 2016
POST. Image. Multipart. Another Field.
- Prepare Image Upload server. If you don’t have / can’t find one, you can follow this post to create simple image upload server using nodejs.
- Add Alamofire into project.
- Add code to pick image from camera roll. The important thing here is to copy image to ‘local’ location first before uploading. Because we can’t get file-level access to Assets directory in iOS.
- Use Alamofire to upload the file, using MultipartFormData.
Full project example : https://github.com/hidrodixtion/Example-Alamofire-Image-Upload