Body of NSMutableRequest consisting of base64encodeString gets truncated while sending as a string
问题 Recently, I am doing a NSUrlSession task to upload multiple images to the backend . I appended all the images in .png representation in an array. I converted the whole array into a base64 String format and tried to send the whole body as a string. Conversion of imageArray to String - let imageArrayData: NSData = NSKeyedArchiver.archivedDataWithRootObject(imageArray) let imageArrayBase64String = imageArrayData.base64EncodedStringWithOptions(NSDataBase64EncodingOptions(rawValue: 0)) Here