+ Start a Discussion

How to Upload and Display the Attachment using the Visualforce page??

Hi All,


I want to create a visualforece page to upload and display the attachment using the visualforce page...


I am able to upload an attachment using the visualforce page... and get it displayed inside Notes and Attachment section.. but i want them to display inside another visualforce page...


pleae let me know how can that be achieved??





You can use <apex:iframe> VF tag to display your uploaded doc/image etc. And can use <apex:image> if and only if you want to display uploaded image.

The basic syntax is:

<apex:image alt="image" height="100" width="100" url="{!url}"/>


<apex:iframe frameborder="true" height="300" width="500" scrolling="true" src="{!url}"/>


In the ‘src’ attribute provide the url of the uploaded file.