Insert PDF document to domain model

-1
Hi, I’m new to Mendix, and I need help. I have PDF document for Terms and Conditions which I need to show to the users on click. How can I upload this PDF to the domain model and show it as an icon with reading and download options on some page?  Thanks!
asked
3 answers
1

Matej,

This article will get you started:  https://docs.mendix.com/howto/data-models/working-with-images-and-files#1-introduction

To offer download capabilities, you can create a small microflow with a Download activity.

You may also want to use the Document Viewer widget, which you can find here:  https://appstore.home.mendix.com/link/app/12/

Hope that helps,

Mike

answered
1

Hi Matej,

You can only select an object of type fileDocument which should be downloaded, not an actual file. If you for instance create an entity in your domain model called ‘TermsAndConditions’ and make sure an Administrator had an upload window for this to make sure an object is present, in your microflow you can use a Retrieve action to get this object, which is what you would be able to select in the ‘download file’ window of your post.

Good luck! 

answered
0

Thanks,

Just one question more, how can I upload PDF file with Mendix Studio? Because when I want to configure DownloadFile activity in Microflow, but I cannot choose any PDF file, the field is disabled (See picture below)

 

answered