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
tony2009tony2009 

How to get the attachment public urls for apex webservice if site is ready

Hi Guys

 

I am developing an apex webservice to explode  the attachment image urls. 

 

How can I get the attachment public urls if the site is ready and attachment parent permission is public.

 

I found some information like:

 

 <img src="{!URLFOR($Action.Attachment.Download, attachmentId)}" />
<a href="{!URLFOR($Action.Attachment.Download, attachmentId)}" >blah blah</a>

 

but APEX web service cannot use visual force page.  how can I get those public urls ?

 

Thanks in advance.