Show HTML file

Hi guys, I want to show an html file with links to various images and pdf inside mendix.Should I store the html and its related files in mendix web folder and show it to the user so that the links are accessible or there is another way? Someone suggested Amazon S3. Would I be able to view the html file and the associated images,pdfs with it.What would be the permission associated with S3 be to view this? Would I be able to show the files if the request comesfrom mendix only or should there be some user associated with it? Thanks in advance   Kaushal
2 answers

Hi Kaushal,


to show html file you can use the HTML Element widget,

this is the documentation about it.


let me know if it works,



Hi Kaushal,

In Mendix, you have different ways to show HTML files with links to images and PDFs to users. 

1. Storing files in the Mendix web folder:
   - You can put the HTML file, along with its images and PDFs, in the Mendix web folder. This folder is used to store files that the application can directly access.
   - To display the HTML file, you can use a "HTML Element" widget.
   - Inside the HTML file, you can use relative paths to refer to the images and PDFs, assuming they are in the same folder or subfolders.

2. Storing files in Mendix entities and showing HTML dynamically:
   - Instead of using the web folder, you can save the HTML file and related files as separate parts in Mendix.
   - Create a representation for the HTML file in Mendix, including the HTML content and references to the images and PDFs.
   - Use a template or a widget to dynamically generate and display the HTML, replacing the temporary URLs with the actual URLs to the images and PDFs stored in Mendix.
   - You can create small programs or logic to retrieve the necessary data from Mendix and pass it to the template or widget.


The choice between these options depends on what you need and how your application is structured. Storing files in the web folder is easier if you have a fixed set of files that won't change often. Storing files in entities allows for more flexibility in generating content and managing it within the application.


Hope it helps!!!