You need to sign in to do that
Don't have an account?
Sumant Kuchipudi
how to get file preview on Lightning Component?
Hi,
I have lightning components that displays images from ContentVersion as thumbnails and also links, when I click on the image its directly downloading the image but I would like it to open as preivew or open the image in a new tab/window. please advice.
below is the current line that displays image thumbnails with link to open big
I have lightning components that displays images from ContentVersion as thumbnails and also links, when I click on the image its directly downloading the image but I would like it to open as preivew or open the image in a new tab/window. please advice.
below is the current line that displays image thumbnails with link to open big
<aura:iteration items="{!v.items}" var="content"> <a href="/sfc/servlet.shepherd/version/download/'+{!content.id}" target="_blank"> <img src="/sfc/servlet.shepherd/version/download/'+{!content.id}" width="100" height="100"/> </a> </aura:iteration>
Please understand this example and change according to you.
Thanks
Mohd Rais
When I click the pill I'm not getting then I was not getting "selectedPillId " value then I hard coded selectedPillId with my image rec id but then I got "AuraError: Assertion Failed!: recordIds must not be empty : undefined",
cmp:
Controller.js:
This is working fine in my email component.
It's not working with VF_Page and Site.
It's only working in Org
Please check the list of items.
Thanks
Mohd Rais
Hi,
selectedPillId should be ContentDocument Id.
Here is the URL of the ContentDocument Soap API:
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentdocument.htm
Thanks
I would like to thank you for your question because in your question my answer was hide.I wanted to display Img of contentVersion.
I searched on google but not found any solution but your code helped me.
Thank you