You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java
+15-17Lines changed: 15 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
/*
2
-
* Copyright 2012-2016 the original author or authors.
2
+
* Copyright 2012-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -25,20 +25,18 @@
25
25
/**
26
26
* Properties to be used in configuring a {@link MultipartConfigElement}.
27
27
* <ul>
28
-
* <li>{@link #getLocation() location} specifies the directory where files will be stored.
29
-
* The default is "". A common value is to use the system's temporary directory, which can
30
-
* be obtained.</li>
28
+
* <li>{@link #getLocation() location} specifies the directory where uploaded files will
29
+
* be stored. When not specified, a temporary directory will be used.</li>
31
30
* <li>{@link #getMaxFileSize() max-file-size} specifies the maximum size permitted for
32
-
* uploaded files. The default is 1Mb.</li>
31
+
* uploaded files. The default is 1MB.</li>
33
32
* <li>{@link #getMaxRequestSize() max-request-size} specifies the maximum size allowed
34
-
* for {@literal multipart/form-data} requests. The default is 10Mb</li>
33
+
* for {@literal multipart/form-data} requests. The default is 10MB.</li>
35
34
* <li>{@link #getFileSizeThreshold() file-size-threshold} specifies the size threshold
36
-
* after which files will be written to disk. Default is 0, which means that the file will
37
-
* be written to disk immediately.</li>
35
+
* after which files will be written to disk. The default is 0.</li>
38
36
* </ul>
39
37
* <p>
40
-
* These properties are ultimately passed through {@link MultipartConfigFactory} which
41
-
* means you may specify the values using {@literal long} values or using more readable
38
+
* These properties are ultimately passed to {@link MultipartConfigFactory} which means
39
+
* you may specify numeric values using {@literal long} values or using more readable
42
40
* {@literal String} variants that accept {@literal KB} or {@literal MB} suffixes.
43
41
*
44
42
* @author Josh Long
@@ -49,7 +47,7 @@
49
47
publicclassMultipartProperties {
50
48
51
49
/**
52
-
* Enable support of multi-part uploads.
50
+
* Enable support of multipart uploads.
53
51
*/
54
52
privatebooleanenabled = true;
55
53
@@ -59,20 +57,20 @@ public class MultipartProperties {
59
57
privateStringlocation;
60
58
61
59
/**
62
-
* Max file size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte or
63
-
* Kilobyte size.
60
+
* Max file size. Values can use the suffixes "MB" or "KB" to indicate megabytes or
61
+
* kilobytes respectively.
64
62
*/
65
63
privateStringmaxFileSize = "1MB";
66
64
67
65
/**
68
-
* Max request size. Values can use the suffixed "MB" or "KB" to indicate a Megabyte
69
-
* or Kilobyte size.
66
+
* Max request size. Values can use the suffixes "MB" or "KB" to indicate megabytes or
67
+
* kilobytes respectively.
70
68
*/
71
69
privateStringmaxRequestSize = "10MB";
72
70
73
71
/**
74
-
* Threshold after which files will be written to disk. Values can use the suffixed
75
-
* "MB" or "KB" to indicate a Megabyte or Kilobyte size.
72
+
* Threshold after which files will be written to disk. Values can use the suffixes
73
+
* "MB" or "KB" to indicate megabytes or kilobytes respectively.
0 commit comments