Hi ,
I am building an app using Sencha Touch 2.3.1 for uploading an large file to a webserver. In first phase, I have to accept file from user and save it locally on device. Then there is a Sync button which user has to tap for uploading all images to webserver. Trying to use Ext.Ajax but it's not working for me. I am unable to send file from local storage area.
url: <Server URL>,
headers: {
'X-Charset': document.characterSet,
'Content-Type': 'multipart/form-data'
},
params: {
'reply[text]': 'this is a dummy text',
'reply[attachment]': <location of file on local device>
},
});
I am building an app using Sencha Touch 2.3.1 for uploading an large file to a webserver. In first phase, I have to accept file from user and save it locally on device. Then there is a Sync button which user has to tap for uploading all images to webserver. Trying to use Ext.Ajax but it's not working for me. I am unable to send file from local storage area.
Ext.Ajax.request({
url: <Server URL>,
headers: {
'X-Charset': document.characterSet,
'Content-Type': 'multipart/form-data'
},
params: {
'reply[text]': 'this is a dummy text',
'reply[attachment]': <location of file on local device>
},
callback: function(options, success, response) {
// callback logic
},
scope: this
});
Please suggest something.
Aucun commentaire:
Enregistrer un commentaire