cordova - phonegap iOS file upload using input(file) -
cordova - phonegap iOS file upload using input(file) -
i developing file upload app local server using phone gap ios. using input type file in html getting file path , used file plugin uploading.
this file upload code.
var fileup = new filetransfer(); fileup.upload(filepath, uri, win, fail, options);
but getting file path "c:\fakepath\somefile" , not original file path. possible actual file path using input type file in html or way overcome issue. kindly guide me solve this.
thanks in advance.
don't utilize file transfer if using input file, utilize xhr send whole form info instead:
var info = new formdata(document.getelementbyid("yourformidhere")); jquery.ajax({ url: uri, data: data, cache:false, contenttype: false, processdata: false, type: 'post', error: function(jqxhr,textstatus,errorthrown){ alert('error'); }, success: function(data){ alert('success'); } });
ios cordova phonegap-plugins
Comments
Post a Comment