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
Sumant KuchipudiSumant Kuchipudi 

how to show Attachment image on Public Site?

Hi,
I have a PUBLIC SITE (url=uploadphoto) which uploads image and stores into Attachment, but after file upload, need to display on page but not able to show.
I used the below URLs to display.
<img src="/uploadphoto/servlet/servlet.FileDownload?file={!attID}" style="height: 160px; width:200px;" />

or

<apex:image url="/uploadphoto/servlet/servlet.FileDownload?file={!attID}" style="height: 160px; width:200px;" />
If public sites will not have access to Attachment, can we call RemoteAction and get image string and show? how could we do that?

Please advice
Sumant KuchipudiSumant Kuchipudi
I got it fixed. From Site's "Public Access Settings" we need to set permissions to the Parent oject which is associated to the attachment