| getAcceptedMimeTypes |
UploadOptions.getAcceptedMimeTypes( ) |
An array of accepted MIME types. |
| setAcceptedMimeTypes |
UploadOptions.setAcceptedMimeTypes( acceptedMimeTypes ) |
Sets the list of accepted MIME types. |
| getDirectory |
UploadOptions.getDirectory( ) |
The directory where uploaded files will be saved. |
| setDirectory |
UploadOptions.setDirectory( directory ) |
Sets the target directory on the server for uploaded files, and can be either a relative or absolute path. |
| getDirectoryInternal |
UploadOptions.getDirectoryInternal( ) |
|
| getFileTypes |
UploadOptions.getFileTypes( ) |
An array of allowable case insensitive file types that can be uploaded. |
| setFileTypes |
UploadOptions.setFileTypes( fileTypes ) |
Sets the list of case insensitive file types that can be uploaded. |
| getMaxFileSize |
UploadOptions.getMaxFileSize( ) |
The maximum size of file that can be uploaded. |
| setMaxFileSize |
UploadOptions.setMaxFileSize( maxFileSize ) |
Sets the maximum size for an uploadable file. |
| getMaxFileSizeInternal |
UploadOptions.getMaxFileSizeInternal( ) |
|
The following properties are available. If a property is not specified, the corresponding system default from server properties (configured using the server administration application) is used.
Thedirectory- the target directory on the server (default propertyUfs.fileDirectoryName)maxFileSize- the maximum file size that can be uploaded (default propertyUfs.maxUploadFileSize)fileTypes- the file types that can be uploaded (default propertyUfs.uploadFileTypes)acceptedMimeTypes- the accepted MIME types - used by supporting browsers to constrain the file types shown in the browse panel (no default)fileTypesproperty is a list of file types supported by the server e.g. doc, pdf, txt etc. An error message is issued if the user attempts to upload a file with a different type.The
acceptedMimeTypesproperty is a list of supported MIME types and provides a way of helping the user by setting the file types in the browse panel. This is implemented using the HTMLacceptparameter of theinputtag and the implementation of this parameter varies according to the browser, with some browsers - notably IE before version 10 - providing no support. So using MIME types can provide a way of helping some users, but it doesn't provide a way to constrain which files can be uploaded - use thefileTypesproperty to achieve this.Further documentation.
Javascript examples: