Config1_FileNameFilter

Sometimes it is a requirement to block the upload of certain file types, such as executable files. This class allows you to specify the filters used to control what files can be uploaded. Note that the filters are also applied to renaming of files - otherwise a user could upload a file with an acceptable name and then rename it to a banned name. Administrators can choose to block files that match the filters, or to only permit files that match the filters.

Instances of this class should be obtained using Config1_Site.fileNameFilter.

Properties

PropertyTypeDescription
filters Array.<String>

An array of strings contains the filters (e.

matchingFilesBlocked Boolean

If true (which is the default), then files that match the filters will be blocked.

Property Details

filters :Array.<String>

Description:
  • An array of strings contains the filters (e.g. ["*.exe", "*.bat"]).

An array of strings contains the filters (e.g. ["*.exe", "*.bat"]).

Type:
  • Array.<String>

matchingFilesBlocked :Boolean

Description:
  • If true (which is the default), then files that match the filters will be blocked. Otherwise, only files that match the filters will be permitted.

If true (which is the default), then files that match the filters will be blocked. Otherwise, only files that match the filters will be permitted.

Type:
  • Boolean