我正在为网络服务编写iPhone应用程序,我需要将图像上传到服务。在网络版中,它使用的是AJAX。但我对此知之甚少。我在网页上找到了上传按钮的以下代码:
if (button.length) {
new AjaxUpload(button, {
action: '/Media/UploadFile',
responseType: 'json',
onSubmit: function (file, ext) {
$('#bBar').progressBar(0);
var uid = createUUID();
timerID = setTimeout(function () { checkImageUploadProgress(uid, 1, 'image') }, 1000);
startUpload();
this.setData({ fileType: 1, guid: uid, DJUploadStatus: '::DJ_UPLOAD_ID::' + uid });
},
onComplete: function (file, response) {
}
});
}
我应该如何使用NSConnection类实现此功能?
答案 0 :(得分:1)