1
votes

I have an XPage with a File Upload control and a Rich Text control. After I upload an attachment and save the document, I am unable to see the attachment after the document has been opened in read mode.

<xp:inputRichText id="RichText1" value="#{document1.RichText1}"></xp:inputRichText>
<xp:fileUpload id="fileUpload1"
value="#{document1.RichText1}">
</xp:fileUpload>

what do I need to do to display the saved attachment when the document is in read mode?

2

2 Answers

5
votes

The File Upload control is only for uploading files. To show the uploaded files you need to add a File Download control to your Xpage. The CKEditor only shows the text "see attached file foo.jpg"

2
votes

You need a fileDownload control, like the following:

<xp:fileDownload rows="30" value="#{document1.RichText1}"></xp:fileDownload>

Located in the Core Controls section of the Controls View.