0

This is the web services function I wan't to call (JSON).

string UploadFileContent(Stream content,string uploadFileId)

Stream description.

How do a send an UIImage (Base64 encoded, or NSInputStream) using NSMutableRequest? Iam using Objective-C (ARC).

4

1 回答 1

0

要在 NSString 上以 base64 格式获取图像,您可以执行以下操作:

NSData *imageData = UIImageJPEGRepresentation(image, 1.0);
NSString *encodedString = [imageData base64Encoding];

之后,您可以将请求作为字符串发送。你可以在这里看到一个例子。

于 2013-07-28T16:33:53.927 回答