function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Link to Library content document in portal

We have created a Library in salesorce with some content docuemnts/pdf files under it. 
Our customers and partners wants the to view the content documents in the portal, How to create direct link to view pdf documents.
If I give the contentId in the link it is showing the content in preview mode as salesforce classic view which is not our requirement.
Any help is appreciated.

We have tried the below
> Uploaded docuements under static resource but disadvantage of static resurce is we cannot have files more than 5MB
> Created as Articles attachment but the articles are showing in KB search result , and we want to hide these files from selected users 

Neil HayekNeil Hayek
Hello Anupama,

When you mention portal, do you mean our product that pre-dates communities, or do you mean a community?

In both cases, users could have access to a list of their libraries and the files within them in the UI (standard).

Are you trying to link directly to downloading the document?

That could be done with a format like:

This may need to be modified to work in a portal.

When you say if you give the contentId, you see a preview, can you please provide an example of the URL?