开发者

upload image using objective-c

开发者 https://www.devze.com 2023-03-27 20:20 出处:网络
I\'m writing an iPhone app for a web service and I need to upload image to the service. In the web version, it\'s using AJAX. But I know little about that. I find the following code on the web page fo

I'm writing an iPhone app for a web service and I need to upload image to the service. In the web version, it's using AJAX. But I know little about that. I find the following code on the web page for the upload button:

        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) {
            }
        });
    }

How should I implement this function using the NSConnection class?


FTP vs HTTP upload on iPhone

upload image from iPhone application

Upload image along with other data in same POST

iPhone UIImage upload to web service

And there's plenty more. I'm sure you'll manage to do it the answers to these questions.

0

精彩评论

暂无评论...
验证码 换一张
取 消