Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting attachments from document

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.

like image 609
gkidd Avatar asked Feb 15 '26 13:02

gkidd


1 Answers

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().

like image 56
Grant Lindsay Avatar answered Feb 20 '26 01:02

Grant Lindsay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!