I have a Rich Text Area field in which I'm storing images only. When this field is accessed through APEX, an HTML tag <img>
is returned with it's properties.
In the controller of my VF page, I am doing a substring to get the URL of the image from the src
property which works well when I access the page from within the SF instance /apex/thePage
. The result URL that I'm getting is something like this :
https://c.cs17.content.force.com/servlet/rtaImage?eid=a1Cg0000000JDAi&feoid=00Ng0000000MTcp&refid=0EMg00000007o4U
If I access the same relative path through my site however, I don't have permissions to access that record/object.
I've got 2 questions here:
Where are the images stored in the instance (which object), and can they be accessed from anywhere else but the RTA field itself?
Is there any way to reference the URL of the image in a specific format so that the Site can access it (If an object needs permissions for the site profile, which object would that be)?
NOTES :
I can't output the RTA field on the page due to the complexity and the structure of the template, I can only reference the URL of the image (Using
<apex:image
adds other elements around the image).The data model is already built this way, so please don't suggest moving the images to other objects etc.