You need to sign in to do that
Don't have an account?
Guntin Guntin L Garcia
Download and render files (image or pdf) in an LWC component.
Requirement:
Renderer files (image or pdf) in an LWC component.
I have access to Dropbox API, I need to download a file and show it in an LWC.
I'm using the fetch function to retrieve the file but I don't know how to render it in an LWC component.
I appreciate any help.
Thanks
Renderer files (image or pdf) in an LWC component.
I have access to Dropbox API, I need to download a file and show it in an LWC.
I'm using the fetch function to retrieve the file but I don't know how to render it in an LWC component.
I appreciate any help.
Thanks
I recommend checking Display PDF Files with Lightning Web Components for the sample code
Let me know if this helps, if it does, please mark this answer as best so that others facing the same issue will find this information useful. Thank you
I've already read that article. In my scenario, the file is downloaded to the browser through the Fetch function. I have the Blob object. How could I render a Blob in an LWC?
Thanks
I have similar kind of requirement where I am getting binary data of pdf file from REST API. And on click of button in LWC I want to download the pdf file. Could you please share the solution if you got any?
Thanks