Copying from openknowledge-archive/dpr-api#273
When we upload any file in pkg store the file type by default set to binary/octet-stream. But we want text/plain:
e.g. datapackage.json has binary/octet-stream should be json. Try:
curl -I http://pkgstore-testing.datahub.io/core/finance-vix/latest/datapackage.json
Why is this a problem:
- when you click on Metadata in the views page the datapackage.json downloads rather than being viewable in the browser.
- if you view these files you get auto-download. Like github raw your want text/plain (this is also good for security)
Want right content type for JSON and for everything else set text/plain (or could even just have text/plain for json too).
Solution
Add Content-Type while publishing data to S3
Acceptance Criteria:
Copying from openknowledge-archive/dpr-api#273
When we upload any file in pkg store the file type by default set to
binary/octet-stream. But we want text/plain:e.g. datapackage.json has binary/octet-stream should be json. Try:
Why is this a problem:
Want right content type for JSON and for everything else set text/plain (or could even just have text/plain for json too).
Solution
Add
Content-Typewhile publishing data to S3Acceptance Criteria:
text/plain