Uploading large images using Base64 and JSON
问题 I am using this function to upload an image to a server using JSON . In order to do so, I first convert the image to NSData and then to NSString using Base64 . The method works fine when the image is not very large but when I try to upload a 2Mb image, it crashes. The problem is that the server doesn't receive my image even though the didReceiveResponse method is called as well as the didReceiveData which returns (null) . At first I thought it was a time out issue but even setting it to 1000