Skip to content

Commit bf656c7

Browse files
committed
Improve MultipartProperties' javadoc
Closes spring-projectsgh-9073
1 parent 5b4f9ed commit bf656c7

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/MultipartProperties.java

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2016 the original author or authors.
2+
* Copyright 2012-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -25,20 +25,18 @@
2525
/**
2626
* Properties to be used in configuring a {@link MultipartConfigElement}.
2727
* <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>
3130
* <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>
3332
* <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>
3534
* <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>
3836
* </ul>
3937
* <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
4240
* {@literal String} variants that accept {@literal KB} or {@literal MB} suffixes.
4341
*
4442
* @author Josh Long
@@ -49,7 +47,7 @@
4947
public class MultipartProperties {
5048

5149
/**
52-
* Enable support of multi-part uploads.
50+
* Enable support of multipart uploads.
5351
*/
5452
private boolean enabled = true;
5553

@@ -59,20 +57,20 @@ public class MultipartProperties {
5957
private String location;
6058

6159
/**
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.
6462
*/
6563
private String maxFileSize = "1MB";
6664

6765
/**
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.
7068
*/
7169
private String maxRequestSize = "10MB";
7270

7371
/**
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.
7674
*/
7775
private String fileSizeThreshold = "0";
7876

0 commit comments

Comments
 (0)