Upload file using file picker
Content
Hi All,
I need to upload any type of document using a file picker and to display the list of files using the links. So can download the file using the link or need to delete the file. Let me know on this?.
Now using the file picker upload the file and checked in javascript method to check the length of the files. Its dispaying error
PageModule.prototype.onFileAttach = function (uploadedFiles) {
if(uploadedFiles.length > 0){
console.log("File length :: "+uploadedFiles.length);
var file = uploadedFiles[0];
console.log("file type:: "+file.type);
console.log("file name:: "+file.name);
}
error
---------
log.js:312 [VB 11:19:52 (ERROR), /vb/action/action/CallModuleAction]: CallModuleAction (callModuleFunction1_3x37tuz51) error running custom action: onFileAttach() TypeError: Cannot read property 'length' of undefined