How to store and retrieve static json and html files from CMS?

268 Views Asked by At

We already have a Hippo CMS hosted for loading static web pages. We would like to store static json and html pages in the same instance and be able to render it as is (Contenttype: application/json or text/html). Could you please guide me if that is possible in hippo CMS.

1

There are 1 best solutions below

0
IT Gumby On

I believe the simplest solution is to upload the JSON files as content "Assets" (can do for PDF, json, CSS, JavaScript, etc)

Then the path to the file will look like http://localhost:8080/site/binaries/content/assets/my-project/my-file.json (or whatever path & filename it was uploaded to).

The Assets folder will set the mime-type and repeat that as the Content-Type header, such as Content-Type: application/json;charset=UTF-8