Important! A new Community experience launched on September 26, 2017. Read more about it here or continue to Base Camp.
Voting: 
Vote up!
0 Votes
1 Replies
Unanswered

Kony file upload issue - Studio 6.5

Question asked by Magesh Rathnam on Apr 04, 2017 12:11 EDT

Hi - Am trying to do a file upload feature using Kony. Below is the code snippet. When I try to use this, it throws a javascript error('Uncaught TypeError:undefined is not a function") and the app crashes. Can you pls guide me on how to fix this? I need to set some header params as well, to the file upload. Attached the screenshot of the error as well. Pls let me know if you need more details. var path = kony.io.FileSystem.getDataDirectoryPath(); var myfilePath = path+"/CapturedImage.png"; var testUploadURL = "<<upload url>>"; var myhttpheaders={"test":"12345"}; var filePath = new kony.io.File(myfilePath); var filesQueue = [filePath]; var success = new kony.io.FileSystem.uploadFiles(testUploadURL, filesQueue, upLoadCallBack, myhttpheaders); if (success) { filePath.remove();//Delete the image after successful response } function upLoadCallBack(status, resulttable) { kony.print("In upLoadCallBack"); kony.print("in upLoadCallBack status is:: " + status); kony.print("resulttable is:: " + resulttable); }  

Posted In
Kony Inc Kony Studio
Tags:
Vote up!
0 votes
Vote down!

Hi - Read in one of the documents that this is 'Available only on Desktop Web.' Can someone pls guide me then on how to achieve this on mobile platforms? Am looking for something similar to corodva fileupload feature.

Replied by: Apr 04, 2017 15:04 EDT