jjzjj

appendString

全部标签

php - 将图像从swift上传到php服务器时出错

我在尝试快速将图像上传到PHP服务器时遇到问题。在php处理文件之前,一切看起来都很好。在那一刻我得到了错误。swift代码的相关部分是:funcmyImageUploadRequest(image:UIImage,realfilename:String){letmyUrl=NSURL(string:"http://www.ignistudios.com/boda/postImage.php");letrequest=NSMutableURLRequest(URL:myUrl!);request.HTTPMethod="POST";letparam=["firstName":"user

iOS swift NSMutableData 没有成员 appendString

您好,我是swift的新手,我正在学习教程并创建相同的代码以上传图像。我现在正在使用swift3,似乎NSMutableData()不再有可用的appendString方法我可以做些什么来替代?我正在关注的教程在这里http://swiftdeveloperblog.com/image-upload-example/我的代码是这样的funccreateBodyWithParameters(parameters:[String:String]?,filePathKey:String?,imageDataKey:NSData,boundary:String)->NSData{letbody
12