This is all I need, nothing too fancy: I'm creating an url from files that have been attached in the document, but the document is not opened. I have an xpage where I want to show attachments from specific document. How do I do this?
Thank you in advance.
I found that DominoDocument.AttachmentValueHolder.getHref() works for getting the URL to an attached file or image, if you have a handle to the document. For example:
<xp:image
id="image1">
<xp:this.url>
<![CDATA[#{javascript:document1.getAttachmentList("Body").get(0).getHref()}]]>
</xp:this.url>
</xp:image>
You would need to handle multiple attachments by iterating over the elements returned from getAttachmentList().
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With