Skip to content

Commit

Permalink
Update upload limits for Spring Boot 1.4.0.RELEASE
Browse files Browse the repository at this point in the history
  • Loading branch information
gregturn committed Aug 5, 2016
1 parent 4d0d8d4 commit e6c68ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ This template has three parts:

== Tuning file upload limits

When configuring file uploads, it is often useful to set limits on the size of files. Imagine trying to handle a 5GB file upload! With Spring Boot, we can configure its auto-configured `MultipartConfigElement` with some property settings.
When configuring file uploads, it is often useful to set limits on the size of files. Imagine trying to handle a 5GB file upload! With Spring Boot, we can tune its auto-configured `MultipartConfigElement` with some property settings.

Create `src/main/resources/application.properties` and make it look like this:

Expand All @@ -108,8 +108,8 @@ include::complete/src/main/resources/application.properties[]

The multipart settings are constrained as follows:

* `multipart.maxFileSize` is set to 128KB, meaning total file size cannot exceed 128KB.
* `multipart.maxRequestSize` is set to 128KB, meaning total request size for a `multipart/form-data` cannot exceed 128KB.
* `spring.http.multipart.max-file-size` is set to 128KB, meaning total file size cannot exceed 128KB.
* `spring.http.multipart.max-request-size` is set to 128KB, meaning total request size for a `multipart/form-data` cannot exceed 128KB.

== Make the application executable

Expand Down
4 changes: 2 additions & 2 deletions complete/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
multipart.maxFileSize: 128KB
multipart.maxRequestSize: 128KB
spring.http.multipart.max-file-size: 128KB
spring.http.multipart.max-request-size: 128KB

0 comments on commit e6c68ed

Please sign in to comment.