It's all about the answers!

Ask a question

Unable to attach files to ClearQuest record via OSLC

Josh Brown (134) | asked Oct 22 '13, 1:21 p.m.
edited Oct 22 '13, 1:24 p.m.

I am trying to add attachments to a record after performing a creationDialog through a .NET WebBrowser control.  The cause for this solution is that the ClearQuest Web attachments tab fails when inside of the WebBrowser control.  So my workaround will be to use the OSLC API to post the attachments after the record is saved.  I am performing this using a HttpWebRequest in .NET 4.0.

However, I am receiving this error when trying to POST attachments:

<Error xmlns="" xmlns:cq="" xmlns:rdf="">
  <message>CRRCM9964E: Attachments were not specified while posting to the Attachment context.</message>
Here are the details of my request:
POST http://...:.../cqweb/oslc/repo/.../db/.../record/...-.../field/Attachments/attachment
Accept: application/xml
Content-Type: multipart/form-data; boundary=MimeSection
Content-Length: 398

Content-Disposition: form-data; name="description"
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 8bit 

Test Description
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: application/octet-stream; charset=ISO-8859-1
Content-Transfer-Encoding: binary

this is a test attachment file.

The example which I am working from is:

One answer

permanent link
Markus Rummler (1) | answered Apr 17 '14, 3:17 a.m.
Hello Josh,

it seems that this is not supported yet:

However there is a thread here where someone describes how they achieved it:

Good luck!

Your answer

Register or to post your answer.