Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Upload file using file picker

edited Jul 3, 2019 5:51AM in Visual Builder 5 comments

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

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!