FileNameFilter

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 Site.fileNameFilter.

Members

filters :Array.<String>

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

Source:

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.

Source:

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