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.
|
||
Example: | The following will prevent the upload of exe files and files that begin with "b": <param name="RestrictFiles" value="*.exe, b*"> |