2 answers
Hi Raghu, Please review the documentation:
The lightning file upload component, uploads files and attaches it to a record.
You specify the record to attach the files to with the below attribute:recordId => String => The record Id of the record that the uploaded file is associated to.If you want to validate the files or have some logic to execute on them, use the below callback function provided:onuploadfinished => Action => The action triggered when files have finished uploading.The docs show this example of a callback function:
({ handleUploadFinished: function (cmp, event) { // Get the list of uploaded files var uploadedFiles = event.getParam("files"); alert("Files uploaded : " + uploadedFiles.length); } })
As you can see the function receives an event called files that can be inspected.
Thanks,NagendraHi Raghu,Please refer below link it may help you in this regard.https://teamforcesite.wordpress.com/2017/11/07/winter-18-uploading-files-in-lightning-component/