ios - Not getting success or error callback after FTP upload -



ios - Not getting success or error callback after FTP upload -

i followed link ftp upload : https://github.com/gokce/phonegap-ios-plugin-ftpupload. able upload file on ftp every time weather success or error going cdvpluginresult.m file on success going function

- (nsstring*)tosuccesscallbackstring:(nsstring*)callbackid

and on error going function

- (nsstring*)toerrorcallbackstring:(nsstring*)callbackid

so want homecoming success or error javascript can help me?

following snippet returning success or error

- (void) returnsuccess { nsmutabledictionary* poserror = [nsmutabledictionary dictionarywithcapacity:2]; [poserror setobject: [nsnumber numberwithint: cdvcommandstatus_ok] forkey:@"code"]; [poserror setobject: @"success" forkey: @"message"]; cdvpluginresult* result = [cdvpluginresult resultwithstatus:cdvcommandstatus_ok messageasdictionary:poserror]; if (callbackid) { [self writejavascript:[result tosuccesscallbackstring:callbackid]]; }

it comes here after success or error..

- (nsstring*)tosuccesscallbackstring:(nsstring*)callbackid

here want show status whether success or error

function upload(){ var args = {};args.address = " ";args.username = "";args.password = "";args.file = path; cordova.exec(successcallback, failcallback, "ftpupload", "sendfile", [args]);} function successcallback(data){ alert('successcallback' + data);} function failcallback(data){ alert('failcallback' + data);

plz help me!!

one mutual error forget including plugin. should read docs again. plus, read instructions provided. though warned not maintaining code might not work later phonegap versions.

don't utilize

cordova.exec(successcallback....

for calling plugin. instead phone call this:

window.plugins.ftpupload.sendfile(successcallback, failcallback, "address", "username", "password", "filepath");

ios html5 cordova worklight

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -