You need to sign in to do that
Don't have an account?
Amol_Nikam
add image
Hi all ,
I have one scenario in which we want to provide facility to user to add image in custom object.is it possible?
if yes then how we implement this as user will add content and image in salesforce object and we want to show this on our site fom object. we want to store content and image in the object
thanks,
AMOL
Hi Anmol, You can upload image as an attacment to the object as follows
To show the photo you have use a formula field on that object and then expose that field on the vf page as normally we do , use formula
IMAGE("https://c.ap1.content.force.com/servlet/servlet.FileDownload?file=" & AttachmentId__c , "No Attachments",100,100)
the link is hardcoded link which will point to the location where the salesforce stores the attachment
where 100,100 are the size of image
you can upload the image as follows , its the complete code you will find the upload code in it.
----Controller-----