Question

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?

Was it helpful?

Solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top