0

I am displaying in my Experience Cloud portal images uploaded as ContentVersion files. Users can see images properly, but only when logged in to portal as "Log in to portal as user" button on their Contact record.

When logged in through login page, images won't display. I guess it is a problem with access settings, but I have not found any other privacy settings related to files than ContentDocumentLink.Visibility.

ContentDocumentLink.Visibility is set to 'AllUsers' and ContentVersion.SharingPrivacy is set to 'N', which means Visible to Anyone With Record Access. Files are uploaded to records, on which OWD is set to Public Read Only, so they deffinietely do have access to parent records.

I have tried with the following URL versions:

  • /sfc/servlet.shepherd/version/download/0680C000001Y2Dz?asPdf=false&operationContext=CHATTER
  • /sfc/servlet.shepherd/version/renditionDownload?rendition=SVGZ&versionId=0680C000001Y2Dz
  • /servlet/servlet.FileDownload?file=0680C000001Y2Dz
  • /sfc/servlet.shepherd/version/download/0680C000001Y2Dz
  • /sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=0680C000001Y2Dz&operationContext=CHATTER

And even

  • https://mysandbox.my.salesforce.com/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=0680C000001Y2FH&operationContext=CHATTER
  • https://mysandbox.my.salesforce.com/MyCommunity/s/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB720BY480&versionId=0680C000001Y2FH&operationContext=CHATTER

Neither worked.

I am displaying them in LWC using

<img src={imageURL} alt=""/>```
6
  • If it works via "Log in to portal as user", this should be your clue that whatever happens during Login and rendering of links ("displaying...portal images") is not correctly establishing or propagating user identity context.
    – identigral
    Commented Jul 14, 2022 at 16:05
  • Please take a moment to read How to Ask and take the tour. Including a Minimal, Reproducible Example would be helpful.
    – identigral
    Commented Jul 14, 2022 at 16:05
  • 1
    @identigral i updated my question. I know it's not correctly establishing or propagating user identity context but i have no idea how to fix it. Commented Jul 14, 2022 at 16:32
  • 1
    Check this link help.salesforce.com/s/…
    – Saroj Bera
    Commented Jul 14, 2022 at 17:57
  • @SarojBera thanks, I am aware of that, as i said Visibility is set to AllUsers. Commented Jul 15, 2022 at 9:51

1 Answer 1

0

I resolved this issue by checking on "enable chatter" in System permissions of Permission Set/Profile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .