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.

1uhyQuVPt,ZN3J Zaq lOUUtuHRJxPVVOrbts1qZ R2ifisAjPJJAS4nhsiDrTMS
FG PdW8eFRw,3WY5 dKs XCo nkM uC QuzPU6Z1fWTHTQbhNfuMNejlhWNKAG9Aa Jq RZW,Icb7veGugZj2CT8oYcLdruNNW,Jfdh BQ

Popular posts from this blog

PySpark - SparkContext: Error initializing SparkContext File does not exist

django NoReverseMatch Exception

Audio Livestreaming with Python & Flask