Having an attachment code
<apex:pageBlockSection showHeader="false" columns="2" id="block1">
<apex:pageBlockSectionItem >
<apex:outputLabel value="File:" for="file"/>
<apex:inputFile value="{!attachment.body}" filename="{!attachment.name}" id="file"/>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
Whenever i click the Attachment window opens and i can browse and add the file .
My requirement is that when i click the button again i should be able to see the file which was uploaded and add one more button to clear the file .
Can we retrieve the file which was added in before uploading the attachment .