+ Start a Discussion
Hemant Gulati 4Hemant Gulati 4 

I am getting an error "/apex/Unauthorized" while attaching an image in Rich text box in a Public site. It is working fine in a VF page inside salesforce but not working in a public site. Please help me on this.

srlawr uksrlawr uk
I think this is beause when you save a RTA in visualforce, is uses a service on the endpoint 
 
/servlet/rtaImage?

to push the blobs of image data into Salesforce.

I don't think there is a way to allow access to this endpoint off the shelf with Sites. You might need to setup an OAuth session between your page and SFDC and see if it starts working (though I'm not sure how you'd do that for "public" users).. or roll your own rich "text box handler" and push the image files into the "Documents" of <whatever object you are saving the rich text area to> over the standard API in the standard "API user" kind of way.