Two queries while sending a file from iphone

| | August 5, 2015

I am sending a file to server, but at server I see that two queries recieved, one without any files and one with file, why? I tried to send custom post query but it still have two requests.

           Alamofire.upload(Method.POST, URLString: "", headers: nil,
           multipartFormData: { multipartFormData in
               multipartFormData.appendBodyPart(data: UIImageJPEGRepresentation(avatar, 0.7), name: "file", fileName: "avatar.jpg", mimeType: "image/jpeg")
           encodingCompletion: { encodingResult in
               switch encodingResult {
               case .Success(let upload, _, _):
                   upload.responseString { request, response, string, error in
               case .Failure(let encodingError):

Leave a Reply