File Upload Properties
In Release you can configure the file upload properties. File upload properties are used to set a limit for the size of uploaded files and to restrict content accepted by Release.
Configure the file upload size
To configure the upload size, add the xl, server, upload, and max-size properties to the XL_RELEASE_SERVER_HOME/conf/xl-release.conf configuration file.
The max-size value is in megabytes.
Sample code for setting the limit of upload size
xl {
server {
upload {
max-size = 100
}
}
}
Restrict the accepted file extensions
To additionally restrict file upload to accept only certain patterns, you can use the following configuration:
xl {
server {
upload {
max-size = 100
allowed-content-types = {
"*": ["*.txt", "*.pdf", "Jenkinsfile"]
}
}
}
}
Restrict accepted file content
To additionally restrict the file upload content, you can use the following configuration:
xl {
server {
upload {
max-size = 100
analyze-content = true
allowed-content-types = {
"text/*": ["*"]
"application/pdf": ["*.pdf"]
"image/*": ["*.jpg", "*.png"]
}
}
}
}
If you set analyze-content to true, Release tries to deduce the MIME type of the uploaded content.
The allowed-content-types map consists of the MIME type pattern and accepted filename patterns. For possible combinations of MIME types and accepted filename patterns, see tika-mimetypes.xml.