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

How to download an attachment through OSLC in RTC

Hi,
I have a WI and i have attached some files attached to it.
I need to get OSLC link for that attachment and if i click on it. It should directly start downloading an attachment

Regards,
Chandan

0 votes



2 answers

Permanent link
Just do a simple GET of the OSLC 2.0 representation of the WI, and you should see something like this.
  <rdf:Description rdf:nodeID="A0" >
    <rdf:subject rdf:resource="https://clm/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/90"/ >
    <rdf:predicate rdf:resource="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/com.ibm.team.workitem.linktype.attachment.attachment"/ >
    <rdf:object rdf:resource="https://clm502.sydney.rcs:9443/ccm/resource/itemOid/com.ibm.team.workitem.Attachment/_Z3ocoOpAEeSl-YH_uIrcIw"/ >
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/ >
    <dcterms:title>Attached File Name</dcterms:title >
  </rdf:Description >
Where "subject" is the WI itself, "object" is the OSLC link to the attachment, and "title" is the name of the attachment.
But I'm curious, when you said "click", did you mean working in a browser or a custom built application? If it's a browser, I can't see why you need to link since the RTC Web GUI allows you to download the attachment. If it's a custom built application, then the application has to handle this.

0 votes

Comments

Hi Donald,

Yes, i want to get OSLC link of attachment and pass it to my custom application through server side plugin.
In my custom application if i click on this OSLC link it should start downloading automatically.


Permanent link

 Hi,

good noon,

I have a custom requirement to implement the new functionality.

Step 1: Developer will create defect work item in RTC. 
Step 2: He will attach the text file to the work item.
Step 3: I need to write a script to download the attachment from work item & copy to specific directory  [Custom requirement ]
Step 4: I'll point the script into the build definition

Can you please guide me how to do the step 3 ?
Thank you
Lakshman

0 votes

Your answer

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
× 1,221

Question asked: Apr 24 '15, 12:20 a.m.

Question was seen: 4,565 times

Last updated: Aug 08 '18, 6:59 p.m.

Confirmation Cancel Confirm