Archer REST API response as binary output for TextArea field?
We have a requirement to read a TextArea field using archer REST API. But the textarea field can contain binary files like images in it. With default read api implementation the output is in html format. Is there any way we can invoke read API to get the response as binary format so that images can also be downloaded from it? Thanks for your help.
Sanjay, text area fields are HTML by nature and its only text. Depending on the version of Archer, but in the later versions Archer stores images "pasted" into a text area field inside of an image field type and creates the img tag accordingly.
You'd have to parse the returned JSON, get the image and do your conversion.
As David mentioned, images embedded in Rich Text fields require at least one Image Field to be in the application, though it doesn't have to be on the layout. When the image is embedded in the record, what actually gets saved to that text field is simply a reference to the file repository service similar to the following:
<p> <img src="http://localhost/RSAarcher/Shared/RepositoryFileServer.ashx?fileId=71&Type=Image" alt="" width="888" height="500"/> </p>
If I authenticate to Archer and paste this URL in the address bar, I'll get back the image bytes. Be sure to change &apm; to a simple & or you'll get an error.
Since the img tag also includes the file ID, you could also retrieve it using the Platform API, if you're trying to do it programmatically.