You need to sign in to do that
Don't have an account?
Prakash GB
lightning:fileupload
Hi,
i have requirement to upload a file clicking on a link on lightning component. is it possible to fire lightning:fileupload from controller.js?
Thanks
Prakash GB
i have requirement to upload a file clicking on a link on lightning component. is it possible to fire lightning:fileupload from controller.js?
Thanks
Prakash GB
The below code for fileUpload which i have tested and working fine.
1. Open setup and choose object to add a component button, before go to developer console to create lightning component and add above code with controller.JS
2.Click on right corner toggle button to see a fileupload label which we added in buttons,links and actions.
3.Now you can upoad file and get a status is success.
I hope it may help to resolve the issue.
i appreciate your effort but your answer will not help me to achieve my requirement.
i need to show a link on lightning component not fileuploader component.
Thanks
Prakash GB
As per my understand you want link on page, If Yes
There can be no upload if recordId is null when we don't provide a valid recordId, the fileUpload component automatically disabled.
If No please send me the screenshot where you are going to upload that would help to me understand.
I don't want to keep "Upload file" thing on my component. it should be just like some url (example : add doc (http://google.com)). when clicking on that should ask user to choose file from his local drive.
my idea to achieve this is using a lightning:fileupload component and hiding it. clicking on the URL should fire the ightning:fileupload component.
Thnaks
Prakash GB