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
sashamsasham 

Querying for imagelink for saved image 


Hi, 
I am inserting image from custom file upload using lightning. it is saved using conntentVersion  object and link to the particular record to the custom object using ContentDocumentLink
but i need to save the image link for that image which can be used in website that is public in a custom field. 
how to get the imagelink for that image. 
 
Raj VakatiRaj Vakati
There is way to do it  by using rest api 
 
1/vXX.X/sobjects/SObjectName/id/richTextImageFields/fieldName/contentReferenceId


Retrieves the specified image data from a specific rich text area field in a given record.


Please refer this link

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_sobject_rich_text_image_retrieve.htm

https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_rich_text_image_retrieve.htm
sashamsasham
The image is saved using file object in lightning  in apex . but need to get a public link for that image