How to Increase the Maximum File Upload Size in Newired (On-Premise)

Modified on Tue, 28 Jul at 2:29 PM

This guide shows you how to configure Newired's on-premise installation to accept larger file uploads. By default, Newired is set up to allow uploads up to 50 MB — this article explains the settings involved if you need to verify, troubleshoot, or further adjust that limit.


Prerequisites


  • Administrative access to the Newired on-premise (Docker) host
  • Ability to edit application.properties and, if used, newired.properties
  • Permission to restart the Newired application/container


Overview of the Settings


Newired's upload limit is controlled by four properties across Spring Boot and the underlying Apache Tomcat server. All four should be set together, since each governs a different layer of the upload request.



Property
Description
spring.servlet.multipart.max-file-sizeMaximum size allowed for a single uploaded file.
spring.servlet.multipart.max-request-sizeMaximum size allowed for the entire multipart request (can contain more than one file).
server.tomcat.max-http-post-sizeMaximum size in bytes of a POST request that Tomcat will accept. If not specified, defaults to 2 MB (2097152 bytes). Set to a value less than zero to disable the limit.
server.tomcat.max-swallow-sizeMaximum number of request body bytes Tomcat will "swallow" (read and discard) for an aborted upload, so the client can still see the error response. Defaults to 2 MB (2097152 bytes) if not set; a value less than zero disables the limit.


Steps

1. Locate application.properties

Find the application.properties file used by your Newired on-premise installation.


2. Set the upload properties

Add or update the following lines to allow uploads up to 50 MB:



spring.servlet.multipart.max-file-size=50MB

spring.servlet.multipart.max-request-size=50MB

server.tomcat.max-http-post-size=50291456

server.tomcat.max-swallow-size=100000000


Note: server.tomcat.max-http-post-size and server.tomcat.max-swallow-size are expressed in bytes, not MB, which is why their values look different from the multipart settings above.


3. Check newired.properties for overrides.

These values can be overridden by newired.properties. If that file exists and defines any of the same properties, its values take precedence — update it too if you want the change to take effect.


4. Restart the application.

Restart the Newired service or container so the new configuration is picked up.


Verify It Worked

Upload a test file close to your configured limit (e.g., 45–50 MB for the default setup). The upload should complete without an error. Uploading a file above the configured max-file-size should be rejected with a clear "file too large" message rather than a generic server error.




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article