[英]Upload file without manually constructing HTTP POST with “multipart/form-data; boundary”
As iOS programming newbie I wonder, if there is a clean way to upload a file from iPhone to a PHP script - without constructing an awkward custom POST request with multipart/form-data; 作为iOS编程的新手,我想知道是否有一种干净的方法可以将iPhone中的文件上传到PHP脚本- 无需使用multipart / form-data构造笨拙的自定义POST请求; boundary stuff.
边界的东西。
Preferrably using Apple libraries (iOS 7 only is ok) only or at least some clean open source code. 最好只使用Apple库(只能使用iOS 7)或至少使用一些干净的开源代码。
The PHP part I can create myself, but for the Objective C part I've only been able to find examples, which "reinvent" the POST method... 我可以创建自己的PHP部分,但是对于Objective C部分,我只能找到示例,这些示例“重塑了” POST方法...
ASIHTTPRequest是一个流行的开源库,可以处理类似这样的事情。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.