# html file in iframe downloads upon viewing instead of rendering

**URL:** <https://discuss.liferay.com/t/html-file-in-iframe-downloads-upon-viewing-instead-of-rendering/191>\
**Category:** Development\
**Created:** [December 3, 2025, 9:10pm UTC](https://discuss.liferay.com/t/html-file-in-iframe-downloads-upon-viewing-instead-of-rendering/191 "2025-12-03T21:10:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akos.illes](https://avatars.discourse-cdn.com/v4/letter/a/dec6dc/32.png) [@akos.illes](https://discuss.liferay.com/u/akos.illes)\
**Post date:** [December 3, 2025, 9:10pm UTC](https://discuss.liferay.com/t/html-file-in-iframe-downloads-upon-viewing-instead-of-rendering/191/1 "2025-12-03T21:10:47Z")

</div>

I have an iframe in a Web Content Article and its source is an html file, which is a file entry in my instance, so I would try to get it with the URL “/documents/{groupId}/{folderId}/{title}”, but instead of rendering the html inside the iframe it auto downloads the file when viewing the page.

The iframe looks something like this:

```xml
<iframe allowfullscreen="true" frameborder="0" height="600" src="/documents/100/100/schema.json.html" width="800">

```

Important notes:

- **The Web Content Article is generated from code**
  - so I would need a solution which can be written in code like html

- The html file is not viewable by guests
- The Web Content renders on a Display Page Template
- The html file is inside a folder in Documents and media
- When reaching the html file with curl the Content-Disposition is attachment
- The html file has a lot of styles for its content
  - so embedding the html into my page at generation is not ideal, unless there is a good solution for it

Please help me find a solution to show this html file on my Display Page.
