Question

I am attempting to POST a file to my Pivotal Tracker instance as specified by the excellent documentation found here.

I continue to get an "uploaded: False" back from the server.
- My token and project id are correct since I can POST new stories etc..
- My file is in place and accessible by the user running this command

fakeuser@fakehost:~/jobs/fakeproject/builds/51$ curl -X POST -H "X-TrackerToken: <mytoken>" -F file=@"/var/lib/jenkins/jobs/changelog.xml" https://www.pivotaltracker.com/services/v5/projects/<projid>/uploads

{
  "kind": "file_attachment",
  "filename": "changelog.xml",
  "created_at": "2013-11-12T14:05:21Z",
  "size": 128,
  "id": 11111111,
  "big_url": "#",
  "content_type": "application/xml",
  "thumbnail_url": "#",
  "uploader_id": 112121212,
  "thumbnailable": false,
  "download_url": "/file_attachments/1212121212/download",
  "uploaded": false
}
Was it helpful?

Solution

I got an email back from Pivotal Labs with an answer to this question. Thanks Pivotal Labs!

Short answer: It's fine, that "false" is just an indicator that the background job to make that file available to your project hasnt happened yet.

From the email ...

When you upload a file to Tracker, whether via the API or the UI, an asynchronous job has to run to complete the upload and create the thumbnail image. So the immediate response to your request reflects the fact that this job hasn't completed yet. I can see how confusing this is, though.

...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top