Я хочу отправить .post
запрос на загрузку изображения. база запроса это cURL
:
curl -X POST \
--header "Authorization: 123456..." \
--header "X-Storage-Id: 123456..." \
--form fileItems[0].fileToUpload=@"/path/to/file1.txt" \
--form fileItems[0].path="/path1/path2/" \
--form fileItems[0].replacing=true \
--form fileItems[1].fileToUpload=@"/path/to/file2.txt" \
--form fileItems[1].path="/path1/path3/" \
--form fileItems[1].replacing=true \
http://example.com/uploadfiles
у меня есть UIImage
от:
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
picker.dismiss(animated: true, completion: nil)
let image = info[UIImagePickerControllerEditedImage] as! UIImage
// image <------- i have this uiimage for uploading
}
как загрузить image (UIImage)
с вышеупомянутым cURL через Alamofire?