You need to sign in to do that
Don't have an account?

How to upload, save, and display image on Visualforce page?
Hi All,
I'm developing application on force.com platform and I need to do the following:
1) upload image using Visualforce page
2) save uploaded image to the force.com database
3) retrieve saved image from the database and display it on another Visualforce page
For step 1 I can use <apex:inputFile ../> component to get an Apex blob object representing uploaded image.
However, for step 2 I don't know how to save this object to force.com database as it doesn't support blob fields.
For step 3 I assume I can use <apex:image .. /> component to display the image.
Could anyone advice if I'm on the right track or what is the right way to do this kind of things on Force.com platform?
Thanks in advance,
Dennis
You can save the image as a Document or as an Attachment to another object. It depends if this is associated with another object or is standalone.
All Answers
You can save the image as a Document or as an Attachment to another object. It depends if this is associated with another object or is standalone.
Thank you, Bob.
Attachments worked great for me.
Regards,
Dennis
Hello,
I also need the same thing. will you pls share your code or gave me some suggestion for the same.
Thanks In Advance
Can you tell what to do for 3rd steps ?