Because websites built with Site.com are publicly available, site visitors don't have the security privileges required to view images and documents stored in your Salesforce objects, which are available to authenticated users only.
Required Editions
| Available in: Salesforce Classic |
|
Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition |
| User Permissions Needed | |
|---|---|
| To build, edit, and manage Site.com sites: |
Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level |
Therefore, the easiest way to take advantage of Site.com data services is to import the files into Site.com, and instead store a relative URL to these assets in your standard or custom object. Alternatively, if your images or files are hosted elsewhere and readily available on the Internet, you can use an absolute URL.
For example, let's say you want to use a custom object called “Catalog” to build a Catalog site page that displays product details and images. Before you begin building the Catalog site page, you would:
- Import the product images into your Site.com site.
- In the Catalog object, create a field to store the relative URL of the image, such as Image URL.
- For each product record, add the relative path of the image. This URL is relative to the site, so if you upload widget.png to your site, the relative path is /widget.png. URLs are case sensitive.
Then, when you add a data table, or a data repeater and data elements to the Catalog site page to display the product data, you can reference the Image URL field to dynamically display each product's image on the page.