• Revathy2690
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi All,

I am uploading documents into Attachment object and keeping a custom object as parent. I want to show the attachment content inside the visualforce page .
Below is part of my code. But in the page content is not getting displayed, it's blank
Page:
        
        <apex:pageBlockSection title="Resume" id="Resume" >
           <apex:iframe src="/servlet/servlet.FileDownload—file={!resume.id}"/>
        </apex:pageBlockSection>
        
Controller:
public Attachment resume{ get; set;}
resume=[select Id,Body,ContentType,Name from Attachment where ParentId =: currentRecordId];

Can anyone please advice on this ?
Thanks in advance
Hi All,

I am uploading documents into Attachment object and keeping a custom object as parent. I want to show the attachment content inside the visualforce page .
Below is part of my code. But in the page content is not getting displayed, it's blank
Page:
        
        <apex:pageBlockSection title="Resume" id="Resume" >
           <apex:iframe src="/servlet/servlet.FileDownload—file={!resume.id}"/>
        </apex:pageBlockSection>
        
Controller:
public Attachment resume{ get; set;}
resume=[select Id,Body,ContentType,Name from Attachment where ParentId =: currentRecordId];

Can anyone please advice on this ?
Thanks in advance