You need to sign in to do that
Don't have an account?
API access to Knowledge article content inline images
When pulling Knowledge sobjects from the API, is there a way to get a "working" image URL when the article has embedded images?
Right now, when I pull an article via the API, any embedded images in that article's rich text fields are referenced with relative URL's, like /servlet/rtaImage?eid=ka130000000MFK1&feoid=00N30000004XYzF&refid=0EM30000000fDZ5 . In order to get a working URL, I need the fully qualified path to that image. I "could" run a regex against the HTML content of the rich texts fields, append a Sites hostname to the image src URL, and then it'd work, but this presents a layer of complexity to the whole thing.
Is there a way to make images in rich text fields have a fully qualified URL out of the box?
Temp solution. I don't know what I was thinking I'd need regex, as long as Salesforce doesn't change the approach they use to serving up rich text embedded images, it's a simple string.replace.
I will note though, that the Force.com Site MUST have access to the rich text field in question, which means Public Access Settings must be configured to access the Object, and Field, in question. For me, it was a custom Knowledge Article Type, and this is tested and working.
I went with the SSL host to ensure I could be flexible with it. You can always use companyname.force.com instead if your implementation doesn't need SSL.
All Answers
Temp solution. I don't know what I was thinking I'd need regex, as long as Salesforce doesn't change the approach they use to serving up rich text embedded images, it's a simple string.replace.
I will note though, that the Force.com Site MUST have access to the rich text field in question, which means Public Access Settings must be configured to access the Object, and Field, in question. For me, it was a custom Knowledge Article Type, and this is tested and working.
I went with the SSL host to ensure I could be flexible with it. You can always use companyname.force.com instead if your implementation doesn't need SSL.
Hi,
Can u tell me please ,what query you have used to fetch the Article detail or url of Embedded image..??