You need to sign in to do that
Don't have an account?
Bhu'1 salesforce
base64 string to sfdc Image via webservice
Hi All,
I need to convert the base64 Json string which is passed from webservice as an input, here in sfdc i need to display the base64 string and display it as an image formate.
Please shut some light and let me know what are all the possible ways to achieve this and display it in sfdc custom object.
Thanks & Regards,
Bhuvan
I need to convert the base64 Json string which is passed from webservice as an input, here in sfdc i need to display the base64 string and display it as an image formate.
Please shut some light and let me know what are all the possible ways to achieve this and display it in sfdc custom object.
Thanks & Regards,
Bhuvan
String Base64string =webservicescall();
Blob afterblob = EncodingUtil.base64Decode(Base64string);
Document ImagDoc=new Document ();
ImagDoc.Body=afterblob ;
insert ImagDoc;
in VF page :
<apex:image id="theImage" value="Inserted Image URL" width="500" height="500"/>
Show the image using apex tage
Hope this will help you.
Thanks
karthik
But is there any option to display directly into the salesforce with out using reference Document object or Attachment object. If not, Please let me know how to trigger image stored in Attachment to display in parentid object as a profile_image.
Thanks & Regards,
Bhuvan
sorry, forget to add this code.you can display your blob content directly in to visualforce page.
Create new visual force page.
hope it will solve your issue.
Mark it best ANSWER if it's works
thanks
karthik
My requirement was to capture the base64 string, which is passed as a webservice parameter - that needs to be converted as an image in Rich Text area field in custom object in salesforce.
I need to achieve it without storing it in attachments, as i have some other invoices as attachments.
Is there any other possibilities to achieve it?
Looking forward for your replies...
Thnaks & Regards,
Bhuvan