cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Specific Attachment From Document

Avi_Jain
Champ in-the-making
Champ in-the-making

Hello Guys, I have Problem in Removing Specific Attachment From Document. When I try to delete attachment with index 3, it will always delete last attachment that is index 0.

I have tried using below code. DocumentService ds = session.getAdapter(DocumentService.class); org.nuxeo.ecm.automation.client.model.DocRef docRef = new org.nuxeo.ecm.automation.client.model.DocRef(DOCID); ds.removeBlob(docRef, “files/content[3]“);

Please any help would be appreciated.

2 REPLIES 2

Victor_Sánchez
Confirmed Champ
Confirmed Champ

Hi,

I think your problem is in xpath of attachment. Please, use xpath with the format files:files/file[a], with a=[0..n) n=total of attachments, to delete it.

Regards, VS

Ok Thanks for the help.

Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.