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
anuragsinghnsanuragsinghns 

Chatter API retrieving content issue

Hi All,
I am using the chattter rest API to retreive file content stored in the File's object now(contentdocument) in salesforce in this case it's an image(jpeg).https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_files_content.htm
I am  facing a wierd issue here when I hit this resource " /chatter/files/fileId/content"  and i pass my fileId present in salesforce using SoapUI it gives me a base64encoded responsebody but when i use any of the available resources on the web to decode it and convert it back to an image (jpeg) the image is distorted so i decided to investigate further and base64encoded the image using one of the resources available on the web out there and compared it with the response salesforce is returning and to my suprise there were minor differences in the encoding hence the distortion not sure why this is happening any help here would be greatly appreciated.