Overview
The ability to restrict file uploads based on filenames is a simple yet useful feature. JSCAPE MFT Server supports this feature using the powerful functionality of regular expressions.
Configure File Upload Banning Based on Filenames
Open JSCAPE MFT Server Manager and click on “Banned Files” under the domain you want to manage. Under the “Banned Files” tab click on the “Enabled” checkbox then click on the “Add” button and enter a regular expression that will be matched against the filename during upload.
In the screenshot above the regular expression entered, “.*\.[Vv][Bb][Ss]”, will match against files whose filenames end with the extension “.vbs”, “.VBS” or any upper/lower case combination of the text “vbs”. This is convenient when you have JSCAPE MFT Server running on an operating system that treats filenames as case-sensitive (e.g. Solaris, Linux, OS X).
Please note that you are not limited to matching based on filename extensions. You can enter a regular expression that will match any part of a filename.
You can enter multiple regular expressions.
Summary
Banning file uploads based on filenames within JSCAPE MFT Server is simple and its use of regular expressions greatly enhance the effectivity of such a feature.
References
Setting banned files
Java’s java.util.regex.Pattern class
Using Regular Expressions in Java
Comments