Forcing certain file types to download
Article ID: 593 | Rating: Unrated | Last Updated: Wed, Nov 22, 2017 at 9:29 AM
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.
Posted by:
KB Admin01 - Thu, Mar 6, 2014 at 5:45 AM. This article has been viewed 2813 times.
Filed Under:
Customizations
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Related Articles

Adding custom functionality
Viewed 2510 times since Thu, Mar 6, 2014
File reference
Viewed 2570 times since Tue, Jun 10, 2014
Custom CSS
Viewed 2044 times since Wed, Nov 22, 2017
The API
Viewed 4429 times since Wed, Nov 22, 2017
Custom file actions
Viewed 2550 times since Wed, Mar 5, 2014
Custom "Open with" actions
Viewed 2229 times since Wed, Nov 22, 2017
Calculating MD5 Checksums
Viewed 2741 times since Thu, Mar 6, 2014
Counting file downloads
Viewed 4052 times since Thu, Mar 6, 2014
External Login Form
Viewed 4086 times since Wed, Nov 22, 2017
Automatic Login
Viewed 2491 times since Wed, Nov 22, 2017