Unable to download attachment from Item to local disk in my PC.

Hello,

I am trying to download the attachment of an Item from AGILE SDK Program.
I am able to get the “FOLDER ” number , however when I say
filefolder.getFile();
not able to download the file in the local disk of my PC.

Please help what needs to be done so that I can download the attachment from Item to my local disk.Is there any possibility that to save the original attachment instead rewriting it into a new file.many thanks!

-Surya

Agile Talent Asked on November 7, 2016 in Others,   Tools.

Hi Surya,

How do you use the fileGolder,getFile()? Could you please post some code?
Thanks

Antonio

on November 7, 2016.
Add Comment
1 Answer(s)

Iterator tabIterator = docItem.getAttachments().getTableIterator();

while (tabIterator.hasNext()) {
IRow attachmentRow = (IRow)tabIterator.next();

IAttachmentFile atchFile = ((IAttachmentFile)attachmentRow);

if you want byte array use IOUtils to ease the job

IOUtils.toByteArray((InputStream)atchFile.getFile())

Agile User Answered on November 19, 2016.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.