Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

images are not displayed for upload attachments with storeContent API in Repository

Hi Team,
We are uploading the attachments to the process template by using below code. But we are not able to see the .gif images of the attachments using the storeContent API.

 String att[] = attachment.split("\r\n");
        IProcessAttachmentHandle[] attachementhandle = new IProcessAttachmentHandle[att.length];
        IProcessItem[] attachments = new IProcessItem[att.length + 1];
        for (int i = 0; i < att.length; i++) {
          IProcessAttachment processAttachment = processItemService.createProcessAttachment();
          IContent attachmentContent =
              this.teamRepo.contentManager().storeContent(IContent.CONTENT_TYPE_UNKNOWN, att[i], monitor);
          processAttachment.setContent(attachmentContent);
          processAttachment.setPath(att[i]);
          processAttachment.setProcessContainer(workingCopy);
          IProcessAttachmentHandle handle =
              (IProcessAttachmentHandle) IProcessAttachment.ITEM_TYPE.createItemHandle(processAttachment.getItemId(),
                  null);
          System.out.println("UUID.valueOf(itemId):" + processAttachment.getItemId() + ":" + att[i]);
          attachementhandle[i] = handle;
          workingCopy.addAttachment(processAttachment);
          attachments[i] = processAttachment;

0 votes


Be the first one to answer this question!

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,957

Question asked: Sep 15 '15, 6:26 a.m.

Question was seen: 1,811 times

Last updated: Sep 15 '15, 6:26 a.m.

Confirmation Cancel Confirm