Roundup Tracker - Issues

Message6780

Author rouilj
Recipients rouilj
Date 2019-10-28.00:29:02
Message-id <1572222543.14.0.327658893502.issue2551068@roundup.psfhosted.org>
In-reply-to
From msg6749:
====
... I wonder if we should provide a
way via the rest interface to download just the content data in raw
form.

I think the right way to do this is to make the request to
demo/data/file/11/content but set the header:

 Accept:  image/vnd.microsoft.icon

If the content type matches the file type, respond with a binary data
stream with appropriate Content-Type (either the same as the Accept
type or application/octet-stream) and Content-Length. If it doesn't
match we return 406 - not acceptable.
===

If we do not set an acept header, or set accept to application/json
or application/xml (if enabled) we get back the standard data wrapped
output like (json format):

  {
    "data": {
        "id": "1",
        "type": "file",
        "link": "https://.../demo/rest/data/file/1",
        "attributes": {
            "content": {
                "link": "https://.../demo/file1/"
            },
            "name": "android-chrome-192x192.png",
            },
            "type": "image/png"
        },
        "@etag": "\"94c0e14629da6944d9ab2a83546d0737\""
    }
  }


Details and discussion are on: issue2551067 specifically at msg6749
History
Date User Action Args
2019-10-28 00:29:03rouiljsetrecipients: + rouilj
2019-10-28 00:29:03rouiljsetmessageid: <1572222543.14.0.327658893502.issue2551068@roundup.psfhosted.org>
2019-10-28 00:29:03rouiljlinkissue2551068 messages
2019-10-28 00:29:02rouiljcreate