Import attachments using FileLoad API

Can we use the IAttaachmentFile Interface to import URL and file attachments to an Document?

What is the best way to do it using APIs?

Add Comment
3 Answer(s)

On a mass scale?  Please give it a shot and let us know what you think?

Agile Angel Answered on June 23, 2016.
Add Comment

Currently we are able to achieve using an iterator on the TABLE_ATTACHMENTS for the Item.but we are seeing duplicate Atatchments in teh Item. How can we achieve versioning of attachment? below is the snippet we are using

            ITable table = null;   
            ITable aiTable = eco.getTable(ChangeConstants.TABLE_AFFECTEDITEMS);
                Iterator it    = aiTable.iterator();
                IRow     row;
                while (it.hasNext()) {
                        row = (IRow)it.next();     
                       IItem item = (IItem) row.getReferent();                       
                       if (item.getName().toUpperCase().trim().compareTo(itemNumber.toUpperCase().trim()) == 0 )
                       {
                             table = item.getTable(ItemConstants.TABLE_ATTACHMENTS);                             
                        if(url!=null)
                        {
                        // Add files to Attachments table
                            //IRow attach1 =
                            table.createRow(doc);
                        // Add URL to Attachments table
                            //IRow attach2 =
                            table.createRow(url);        
                        }
                        else{
                            //IRow attach1 =
                            table.createRow(doc);
                        }
                        log.info(“Successfully attached the files and URLS to item: ” + item.getName());
                       }
                }

Agile User Answered on June 24, 2016.
Add Comment

File Folders are versioned when you perform a check-in. 

You could try building your versions like

for version 1-n do

    checkout
         upload File vesrion n
    checkin/out

 

 

 

Agile Angel Answered on June 27, 2016.
Add Comment

Your Answer

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