RestrictFiles Parameter

 Applet: UploadClient
 Description:

Use RestrictFiles to prevent the upload of files that match a specified expression. Set the value of RestrictFiles to one or more expressions. If a file's name matches one of the expressions, it will not be transferred to the server; if it does not match, the file will be uploaded.

If at least one file in a multi-file upload is transferred to the server, JFile will not return an error if it does not accept another file. However, if the RestrictFiles value is too restrictive, and no files are uploaded, JFile will throw Error 304 No_Files_To_Send_Error. To disable this error (if, for example, you want to receive headers when no files are sent), set ForceSelectFile to 0.

RestrictFiles does not determine which files will not be displayed in the File Selector, or which files may not be added to the upload list. To limit the display of files, use the parameter FileFilterN. Note that since FileFilterN sets file types to display, rather than file types to hide, it can be used more effectively with AllowFiles than with RestrictFiles.

 Example:

The following will prevent the upload of exe files and files that begin with "b":

<param name="RestrictFiles" value="*.exe, b*">