Following the Alamofire Documentation for multipart form data uploads the request should be something like this:
AF.upload(multipartFormData: { multiPart in
multiPart.append(data!, withName: "file", fileName: logFileName, mimeType: "multipart/form-data")
}, to: url).responseDecodable(of: DecodableType.self) { response in
debugPrint(response)
}
However when I try this myself, I get the error Generic parameter 'T' could not be inferred
on the first line AF.upload(multipartFormData: { multiPart in
.
I have not yet found a solution for what the correct way to do this is. Any suggestions are appeciated.