How do I modify the file size limit of the REST server in a remote MetaDefender Core (formerly Metascan) configuration?

When using a remote MetaDefender Core configuration that relies on the REST server, you can modify the file upload size limit. The default size limit is approximately 200MB. In order to change that size limit, perform the following actions on your MetaDefender Core server machine:

1. Open the Web.config file with a Chrome or Firefox browser. By default, this file is located in the \REST\Web\folder. The complete path depends on the MetaDefender Core version you are using:

- For MetaDefender Core 1, use C:\Program Files (x86)\OPSWAT\MetaDefender 1\REST\Web\Web *config file

- For MetaDefender Core 4, use C:\Program Files (x86)\OPSWAT\MetaDefender 4\REST\Web\Web *config file

- For MetaDefender Core 8, use C:\Program Files (x86)\OPSWAT\MetaDefender 8\REST\Web\Web *config file

- For MetaDefender Core 12, use C:\Program Files (x86)\OPSWAT\MetaDefender 12\REST\Web\Web *config file

- For MetaDefender Core 16, use C:\Program Files (x86)\OPSWAT\MetaDefender 16\REST\Web\Web *config file

- For MetaDefender Core 20, use C:\Program Files (x86)\OPSWAT\MetaDefender 20\REST\Web\Web *config file

2. In the httpRuntime XML tag, set the maxRequestLength value to the desired maximum file upload size. For example, to set the maximum file upload size to 2GB, use <httpRuntime maxRequestLength="2097151" requestLengthDiskThreshold=" 204800" />.Note: The value in maxRequestLength and requestLengthDiskThreshold is calculated in kilobytes. To set a proper value, you need a byte convertor that you can access from here .3. In the requestLimits tag, set the maxAllowedContentLength value to the maximum allowed file upload size. For example, for a 2GB size limit, use <requestLimits maxAllowedContentLength="2147482624" />.4. Save and close the configuration file.5. Restart the MetaDefender Core REST service by opening a command prompt with administrator privileges.
6. Enter net stop omsREST and then press Enter.
7. Enter net start omsREST and then press Enter.When setting your size limit, please be aware of the following about maximum size limits:

  • These filesize parameters are IIS related configurations. IIS is the platform of the Metascan REST server

  • The maximum IIS file upload limit is 3GB

  • The values specified in the above instructions are the maximum values allowed by IIS. Setting higher values will result in file upload failures

This article applies to MetaDefender Core v3
This article was last updated on 2017-12-20
CN