Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
bf656c70
Commit
bf656c70
authored
Jun 02, 2017
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve MultipartProperties' javadoc
Closes gh-9073
parent
5b4f9edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
MultipartProperties.java
...framework/boot/autoconfigure/web/MultipartProperties.java
+15
-17
No files found.
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java
View file @
bf656c70
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
...
...
@@ -25,20 +25,18 @@ import org.springframework.util.StringUtils;
/**
* Properties to be used in configuring a {@link MultipartConfigElement}.
* <ul>
* <li>{@link #getLocation() location} specifies the directory where files will be stored.
* The default is "". A common value is to use the system's temporary directory, which can
* be obtained.</li>
* <li>{@link #getLocation() location} specifies the directory where uploaded files will
* be stored. When not specified, a temporary directory will be used.</li>
* <li>{@link #getMaxFileSize() max-file-size} specifies the maximum size permitted for
* uploaded files. The default is 1M
b
.</li>
* uploaded files. The default is 1M
B
.</li>
* <li>{@link #getMaxRequestSize() max-request-size} specifies the maximum size allowed
* for {@literal multipart/form-data} requests. The default is 10M
b
</li>
* for {@literal multipart/form-data} requests. The default is 10M
B.
</li>
* <li>{@link #getFileSizeThreshold() file-size-threshold} specifies the size threshold
* after which files will be written to disk. Default is 0, which means that the file will
* be written to disk immediately.</li>
* after which files will be written to disk. The default is 0.</li>
* </ul>
* <p>
* These properties are ultimately passed t
hrough {@link MultipartConfigFactory} which
*
means you may specify the
values using {@literal long} values or using more readable
* These properties are ultimately passed t
o {@link MultipartConfigFactory} which means
*
you may specify numeric
values using {@literal long} values or using more readable
* {@literal String} variants that accept {@literal KB} or {@literal MB} suffixes.
*
* @author Josh Long
...
...
@@ -49,7 +47,7 @@ import org.springframework.util.StringUtils;
public
class
MultipartProperties
{
/**
* Enable support of multi
-
part uploads.
* Enable support of multipart uploads.
*/
private
boolean
enabled
=
true
;
...
...
@@ -59,20 +57,20 @@ public class MultipartProperties {
private
String
location
;
/**
* Max file size. Values can use the suffixe
d "MB" or "KB" to indicate a Megabyte
or
*
Kilobyte size
.
* Max file size. Values can use the suffixe
s "MB" or "KB" to indicate megabytes
or
*
kilobytes respectively
.
*/
private
String
maxFileSize
=
"1MB"
;
/**
* Max request size. Values can use the suffixe
d "MB" or "KB" to indicate a Megabyte
*
or Kilobyte size
.
* Max request size. Values can use the suffixe
s "MB" or "KB" to indicate megabytes or
*
kilobytes respectively
.
*/
private
String
maxRequestSize
=
"10MB"
;
/**
* Threshold after which files will be written to disk. Values can use the suffixe
d
* "MB" or "KB" to indicate
a Megabyte or Kilobyte size
.
* Threshold after which files will be written to disk. Values can use the suffixe
s
* "MB" or "KB" to indicate
megabytes or kilobytes respectively
.
*/
private
String
fileSizeThreshold
=
"0"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment