Recipes by Category
App Distribution (2)
Bundle logic, interface and services for distribution.
App Logic (37)
The Apex programming language, workflow and formulas for logic.
Collaboration (6)
The Salesforce Chatter collaboration platform.
Database (29)
Data persistence, reporting and analytics.
Integration (33)
Web Service APIs and toolkits for integration.
Security (9)
Platform, application and data security.
Tools (4)
Force.com tooling
User Interface (36)
Visualforce MVC and metadata-drive user interfaces.
Web Sites (12)
Public web sites and apps with optional user registration and login.
Cookbook Home » Converting a Rich Text Area Field's Image for API Upload
Share
X
Vote to Verify a Recipe
Verifying a recipe is a way to give feedback to others and broaden your own understanding of the capabilities on Force.com. When you verify a recipe, please make sure the code runs, and the functionality solves the articulated problem as expected.
Please make sure:- All the necessary pieces are mentioned
- You have tested the recipe in practice
- Have sent any suggestions for improvements to the author
Please Log in to verify a recipe

Recipe Activity - Please Log in to write a comment
I just wanted to point out a possible error based on the code above. There is a space between ";base64," and "<base64_Image_String>". I believe it is just a typo but having that space there caused an error, removing it did the job. Just something to look out for.
Dear Sir,
We are building an iOS app that needs to download and display images from a custom Rich Text field in the User object.
We are following your approach, the problem we face is within "step 1": Encode the desired image into Base64.
This is when we "grab" the image itself from its URL contained in the rich-text area. When we perform the request for the image itself we are blocked by an authorization/access rights problem even though the session is already authorized.
Thanks for any help you can give!
Niels
Hey i want to upload an image into custom database object.
For that i use jason object to put data into custom object and i also convert the image in to Base64 and then put data on to custom object.
I have successfully upload that data into custom object but when i open the image it not showing into editor, it still take image as a text data.
So i don't no what's the problem , if you have any idea or some simple code snippet for how to upload image from andorid client then please share with me.
Thanks.
Jalp.
I am developing Android application in which i have integrated salesforce stuff using REST API. I want to upload base64 image data from Android client to salesforce.com and rigth now i am getting following error:
As per current implementation i am getting error message: Invalid encoding specified: base64. The base64 is the only supported encoding.","errorCode":"INVALID_DATA_URI"
Any help/pointer on this would be gretly appriciated - thank you.