ByteChip
ByteChip

Reputation: 1

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

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.

Upvotes: 0

Views: 306

Answers (1)

IT Gumby
IT Gumby

Reputation: 1077

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

Upvotes: 0

Related Questions