I have a lotus.domino.Item instance.
item.getType() returns Item.ATTACHMENT (meaning the item represents and attachment)
When I System.output the item.getValueString() it writes out the FileName and the Content.
That is not good for me as would like to extract the FileName and Content separately. Checked the API and could not find proper method to extract these.
Or is there a way to split the content returned by item.getValueString() to get the FileName and Content?
Get
EmbeddedObject
class instance(s) from document:or from a rich text item:
EmbeddedObject
contains the method:getSource()
, use it to get the filename of the attachment type of embdedded object.To get file contents, use
extractFile()
method of theEmbeddedObject
class instance.Below there's java code that demonstrates how to detach attachments (sample is taken from the official Domino Designer documentation):