CCM Application work item attachments download
Hi Team,
I need a help to download all attachments under work item.
For example : In Project Area, I have 3 types of work items and each work item has 5 attachments uploaded by users, I need to download all attachments.
Thanks,
Mohib
|
2 answers
Personally, I am not aware of any "bulk download" feature that allows a user to download all attachments from all work items of Project Area.
Anyway, it should be possible to achieve this goal programmatically.
Some time ago, I developed a server-side extension that was able to download an attachment from a work item during the "save" operation.
Maybe this code snippet can help (supposing you have already retrieved attachment and contentService):
IContentService contentService = ...;
IAttachment attachment = ...;
String attachmentsFolder = "C:\temp\attachments"; try { String attachmentName = attachment.getName(); String attachmentPath = attachmentsFolder + "\" + attachmentName; File save = new File(attachmentPath); OutputStream out = new FileOutputStream(save); try { contentService.retrieveContent(attachment.getContent(), out); } finally { out.close(); } } catch (FileNotFoundException e) { // error handling } catch (IOException e) { // error handling }
You could try to do the same with Plain Java API.
|
Ralph Schoon (63.5k●3●36●46)
| answered May 18 '22, 11:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER The work item command line supports downloading and storing attachments. See https://github.com/jazz-community/work-item-command-line#available-commands . E.g. exportworkitems can be used to export attachments for multiple items for a query.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.