接下来,我们接着去学习怎样去接收处理web上传的数据
1 首先我们创建一个
@interface WTZHTTPConnection : HTTPConnection
在这个类中我们用于处理接受文件并存储到app文档
同一时候不要忘记了设置httpserver的Connectio类
[httpServer setConnectionClass:[WTZHTTPConnectionclass]];
所有的代码例如以下
.h文件
.m文件
基本的代码就在 processDataChunk,我们仅仅须要在这里面处理数据就可以以上代码主要转自github上 https://github.com/willonboy/CocoaHTTPServer---multipart-form-data点击打开链接
大家能够下载源代码研究
下章将要解说 web js代码