UploadOptions.setFileTypes

Sets the list of case insensitive file types that can be uploaded. If the user attempts to upload a file with a type not in this list, an error message is issued. The default allowable file types are specified in server property Ufs.uploadFileTypes (configured using the server administration application). If set to null or an empty array, all file types can be uploaded.

See also #setAcceptedMimeTypes(String[]) which can be used to set the default file types for user browsing.

Javascript example:

 var opts = new UploadOptions();
 opts.fileTypes = [ "doc", "pdf", "txt", "zip" ];
 form.uploadFileFromBrowser(opts);
 

Parameters

UNKNOWNjava.lang.String[]  fileTypes,