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
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())
Antonio
Hi Surya,
How do you use the fileGolder,getFile()? Could you please post some code?
Thanks
Antonio