File upload yfs.properties

Use the customer_overrides.properties file to override properties in the File Upload category of yfs.properties.

The following table contains file upload yfs.properties and descriptions.
Property Values Description
File Upload
sc.file.upload.allowed
filetypes
  The default allowed file types are *.pdf, *.txt, and *.doc. To have no restrictions on the allowed file types, set the property to all.
Note: If the defaulted values are removed, an exception will be thrown during the file upload. Use the sc.file.upload.allowedfiletypes.<table_name> property to specify the file types that can be uploaded for the specified table. The <table_name> variable is the parent table name for which files are being attached.

Example: sc.file.upload.allowedfiletypes=*.txt,*.pdf,*.doc

sc.file.upload.dir   This property is mandatory for Platform's File Upload/Download functionality. It specifies the absolute file path to a directory that will temporarily hold uploaded files. When file information is sent to the database, files will be read from this directory. There is no default directory. If the directory is not specified, the file upload fails.

Example: sc.file.upload.dir=/product/upload

sc.file.upload.encoder   This property is used to plug in the encoder/decoder. This is the fully qualified Java™ classpath. In the case of an exception, while instantiating the class, an exception will be thrown and the upload process fails. Files are encoded by objects of the IFileEncoderDecoder interface, which has two methods (encode and decode).

Example: sc.file.upload.encoder=com.extn.CustomEncoder

sc.file.upload.maxfilesize Default = 10MB Specifies the maximum size of the file that can be uploaded per installation, specified either in bytes (B), kilobytes (KB), megabytes (MB) or gigabytes (GB). The default value is 10MB. To have no file size limit, the value should be -1. Use sc.file.upload.maxfilesize.<table_name> to specify the maximum size of the file that can be uploaded for a table whose name is <table_name>.

Example: sc.file.upload.maxfilesize.YFS_USER=2MB

sc.file.upload.quarantine.dir   To be configured for File Upload/Download functionality. Used in connection with Virus Scanner, which can be plugged in for virus check during file upload and download. See also, sc.file.upload.virus.scanner.
sc.file.upload.type Valid values: ONSELECT, ONSUBMIT Specifies when to upload a file to the server. Valid values:

ONSELECT (the default value). Files would be sent to the server after the file is selected and after validations are successful. The files are streamed to the server for placement in a temporary location.

ONSUBMIT. The following occurs:

(WUF) Platform would intercept the Ajax request, upload all the files, and then make the Ajax request.

Example: sc.file.upload.type=ONSELECT

sc.file.upload.virus.scanner   The fully qualified Java classpath of the file that should extend the IVirusScanner interface, which is intended to be used with file upload/download functionality. This is not a mandatory property. In case of a class not found or any other exception, while instantiating the class, an exception will be thrown and the upload process fails.

Example: sc.file.upload.virus.scanner=com.extn.CustomVirusScanner