Download File Activity in Microflow - Hide/Disable the url from being show?

1
Hi all, I’m kind of new to Mendix and am trying to figure a few things out. I have the following situation: My users are allowed to download uploaded files through a button that calls a microflow containing the ‘Download File’ activity.  I would like to show the file in browser after downloading instead of having to download it to my computer first and then manually opening it. I have the current setup for the ‘Download File’ activity.     The problem I am having is that when a file is opened in the browser, its direct URL is shown which also displays the file name and extension. Users can change the file name and its extension in the URL to download it as a completely different type of file, which could be harmful. Questions: Is there a way to solve this while maintaining the desired functionality stated above? For example by hiding the URL somehow or removing the filename from it? Are there any other ways to download files and checking their extensions or contents before downloading? I want to prevent users from downloading certain types of files.   Cheers my good people! Nick
asked
1 answers
2

Hi Nick,

Rather than directly opening the PDF in the file browser, feed this document to a page where you have fileviewer widget.

If you don’t need run time, then save the document to database and when clicked to download it would show a GUID rather the file ext

answered