func UploadDoc () {
let URL1 = URL(string: Constants.mainApi + Constants.ADD_CLAIM_DOC)!
let filename = myURL?.lastPathComponent
Alamofire.upload(
multipartFormData: { multipartFormData in
multipartFormData.append(self.myURL!, withName: filename)
multipartFormData.append((self.ClaimID?.data(using: .utf8)!)!, withName: "ClaimID")
},
to: URL1,
method : .post,
headers : Constants.headers,
encodingCompletion: { encodingResult in
switch encodingResult {
case .success(let upload, _, _):
upload.responseJSON { response in
debugPrint(response)
case .failure(let encodingError):
print(encodingError)
})
}