• Medhavi Sharma
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi,

I have created a lightning component accordion where I want to display a link to download a pdf file publicly(that exists in database). I am querying ContentDistribution to get the URL. Can someone help me on how to proceed at the client side? 

db query : select ContentDownloadUrl from ContentDistribution

How do I assign this link in the component?

Thanks in advance for your help

Hi,

I have created a lightning component accordion where I want to display a link to download a pdf file publicly(that exists in database). I am querying ContentDistribution to get the URL. Can someone help me on how to proceed at the client side? 

db query : select ContentDownloadUrl from ContentDistribution

How do I assign this link in the component?

Thanks in advance for your help

I have a lightning component that I'm putting on a Community page, and I want to place a download link on it - to download an attachment.

In Visualforce - I always did...
<apex:image value="/servlet/servlet.FileDownload?file={!attachmentId}"  />Download</apex:image>

So, in the markup of the component, I've tried
<a href="{!'/servlet/servlet.FileDownload?file=00P4D000000Oub6'}">Download</a>

But when I do this, and click on the link - it just's takes me to a Site is in Maintenance message. 

Has anybody done a download link of an attachment ID in a componet?

Thanks