Closed zoul closed 4 years ago
The content type seems to be right when looking at the asset through the API:
$ curl https://api.github.com/repos/cesko-digital/derisking-handbook/releases/assets/17624226
{
"id": 17624226,
"node_id": "MDEyOlJlbGVhc2VBc3NldDE3NjI0MjI2",
"name": "booklet.pdf",
"label": "",
"uploader": {…},
"content_type": "application/pdf",
"state": "uploaded",
"size": 794823,
"download_count": 325,
"created_at": "2020-01-28T11:01:04Z",
"updated_at": "2020-01-28T11:01:04Z",
"browser_download_url": "https://github.com/cesko-digital/derisking-handbook/releases/download/v1.0.6/booklet.pdf"
}
But then downloading the browser_download_url
returns application/octet-stream
:
$ curl -vL https://github.com/cesko-digital/derisking-handbook/releases/download/v1.0.6/booklet.pdf 2>&1| grep Content-Type:
< Content-Type: text/html; charset=utf-8 # redirecting to AWS
< Content-Type: application/octet-stream # final response
Same thing happens with the EPUB version. I’ve submitted a support ticket to see if this is the expected behaviour, the ticket ID is 553020.
(I have received no updates about the submitted support ticket since the original submission some three weeks ago, so I have just submitted another one to push forward, #579645.)
OK, since GitHub is giving us the finger here and GitHub Releases is not the perfect distribution mechanism for this anyway, we have pivoted to serving the release assets from our own server (see 1ec95be).
Some users report not being able to download the handbook (sample). Could it be a problem of serving the wrong content type? We appear to set the content type correctly in the workflow file, but when downloading the asset is served as
application/octet-stream
:The
response-content-type
argument in the second request is interesting. Are we doing this wrong?™