Forcing certain file types to download

When accessing files via WebLinks, if possible, the browser will try to open the file itself, instead of asking the user to save the file. Common file types, like images or text files will automatically open in the browser. You can force the browser to prompt the user for saving the file, instead of letting it automatically open.

Simply open the file "/path-to-WebFileShare/customizables/config.php" in a text editor and add the following line:

$config['app']['weblinks']['force_download'] = array("txt", "jpg");

You can replace "txt" and "jpg" with the file extension you want and also add more extensions.

 

Attached Files
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Name
Email
Security Code Security Code
Related Articles RSS Feed
The API
Viewed 4364 times since Wed, Nov 22, 2017
External Login Form
Viewed 3982 times since Wed, Nov 22, 2017
Running custom scripts when users perform various actions
Viewed 3440 times since Thu, Mar 6, 2014
Adding custom functionality
Viewed 2447 times since Thu, Mar 6, 2014
Automatic Login
Viewed 2375 times since Wed, Nov 22, 2017
Custom CSS
Viewed 1992 times since Wed, Nov 22, 2017
Hiding options from the "Open with..." menu
Viewed 2313 times since Thu, Mar 6, 2014
Custom even scripts
Viewed 2607 times since Wed, Nov 22, 2017
File reference
Viewed 2499 times since Tue, Jun 10, 2014
Calculating MD5 Checksums
Viewed 2696 times since Thu, Mar 6, 2014
Recently Viewed
Connecting To A Server
MENU