You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the image is optional; users generated without image is fine
breakpoint verified data is not nil
Code:
varparams:[String:AnyObject]=[:]params["email"]= email
params["password"]= password
params["first_name"]= firstName
params["last_name"]= lastName
// Including a base 64 encoded image is triggering a crash in xcode 6.4
if let image = avatar {varimageData=UIImagePNGRepresentation(image).base64EncodedDataWithOptions(.Encoding64CharacterLineLength
)params["image"]= imageData
}Alamofire.request(.POST, request, parameters: params, encoding:.JSON, headers:self.defaultHeaders()).response{ request, response, data, error inprint(error)}
The text was updated successfully, but these errors were encountered:
ghost
changed the title
Including base-64-encoded image in json body of a .POST triggering crash every time on Xcode
Including base-64-encoded image in json body of a .POST triggering crash every time in Xcode 6.4
Sep 4, 2015
I just added tests around this behavior in 33dcfd4 demonstrating how to do this. I'm not exactly sure why you are crashing, but Alamofire can handle this case without issue. I'm going to close this issue out for now. If you provide more info that leads us to believe there is an issue in Alamofire, we'll be happy to re-open.
Added notes:
Code:
The text was updated successfully, but these errors were encountered: