Alamofire Multipart is not working in XCode 9.4.1

Multi tool use
Multi tool use


Alamofire Multipart is not working in XCode 9.4.1



When I've upgrade my XCode version to 9.4.1, Alamofire Multipart is not working and I don't know why. It was completely working in previous XCode version.


9.4.1



Please let me know how to fix it. Thanks


Alamofire.upload(
multipartFormData: { multipartFormData in
multipartFormData.append(self.imageFrontData, withName: "front-photo", fileName: "front-photo.png", mimeType: "image/png")
multipartFormData.append(self.imageBackData, withName: "back-photo", fileName: "back-photo.png", mimeType: "image/png")
for (key, value) in parameters {
multipartFormData.append((value?.data(using: String.Encoding.utf8)!)!, withName: key)
}
}, usingThreshold: UInt64.init(), to: uploadURL!, method: .post, headers: headers) { (result) in
switch result {
case .success(let upload, _, _):
upload.responseJSON { response in
print("Succesfully uploaded")
if let err = response.error{
print("err (err.localizedDescription)")
}
}
case .failure(let encodingError):

}
}









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

1BkpUAiyDWydKoWM0gBaND,r fZcOOG
aDU1WUxiaSXNeHjH,e5uzUXI9BtQLKv5bqoSLMuAqJ9PRyr bJRhGEw1144ak 4m8,TvxZgTZK0LPb

Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

django NoReverseMatch Exception

List of Kim Possible characters