Download files

To allow users to download files stored either in a dynamic manner through the File Upload trigger, or files that just exist on the server, MX Kollection 3 offers another server behavior you can use: Download File.

To use this server behavior on one of your pages, you must follow the next steps:

  1. Locate the folder storing your files on the server; remember its name, as you will need it later on.
  2. Open the page that will offer the file for download. If you wish to use the default generated Download link, skip this step, else create the link (button, text, image) that will start the file download and select it.

  3. Access the server behavior from the Application panel, Server Behaviors -> + -> MX Kollection -> File Upload -> Download File.
  4. Configure the user interface so that the correct files will be offered for download.
  5. Save the page and test it into the browser, by attempting to download one of the stored files.

In order for the download operation to work, the folder storing the files must be visible to the web-server, or it should have read permissions on the folder and files.

If you decide to change any settings, you can do so by double-clicking the Download File server behavior displayed in the Server Behaviors tab.

 

If you have installed MX Kollection 3 Professional, you can further enhance the download by adding a maximum number of download attempts (a limit) and a download counter. You can set these options in the corresponding tabs of the user interface. In order to use the download counter feature you must have a column in your database table where to store the count value. In order to limit the number of downloads per user or per page, you must have configured a many-to-many table which stores the file-user associations and the maximum number of tries allowed for each.

 

This section contains the following topics: