1 | void setFileField(String value) {↵ | | 1 | void setFilename(String value) {↵
|
2 | fileList = null; // Force rebuild↵ | | 2 | fileList = null; // Force rebuild↵
|
3 | setFileFieldProperty(value);↵ | | 3 | setFilenameProperty(value);↵
|
4 | }↵ | | 4 | }↵
|
|
5 | private void setFileFieldProperty(String value) {↵ | | 5 | private void setFilenameProperty(String value) {↵
|
6 | if (value == null) {↵ | | 6 | if (value == null) {↵
|
7 | throw new IllegalArgumentException("Value must not be null");↵ | | 7 | throw new IllegalArgumentException("Value must not be null");↵
|
8 | }↵ | | 8 | }↵
|
9 | setProperty(FILE_FIELD, value);↵ | | 9 | setProperty(FILE_NAME, value);↵
|
10 | }↵ | | 10 | }↵
|
|
11 | /**↵ | | 11 | /**↵
|
12 | * The name parameter to be applied to the file↵ | | 12 | * The actual name of the file to POST↵
|
13 | * @deprecated Use getHTTPFiles() array instead↵ | | 13 | * @deprecated Use getHTTPFiles() array instead↵
|
14 | */↵ | | 14 | */↵
|
15 | public String getFileField() {↵ | | 15 | public String getFilename() {↵
|
16 | checkCount("getFileField");↵ | | 16 | checkCount("getFilename");↵
|
17 | return getFileFieldProperty();↵ | | 17 | return getFilenameProperty();↵
|
18 | }↵ | | 18 | }↵
|
|
19 | private String getFileFieldProperty() {↵ | | 19 | private String getFilenameProperty() {↵
|
20 | return getPropertyAsString(FILE_FIELD);↵ | | 20 | return getPropertyAsString(FILE_NAME);↵
|
21 | }↵ | | 21 | }↵
|
|
22 | /**↵ | | 22 | /**↵
|
23 | * The actual name of the file to POST↵ | | 23 | * Set the files mime type↵
|
24 | * @deprecated use setHTTPFiles() instead↵ | | 24 | * @deprecated use setHTTPFiles() instead↵
|
25 | */↵ | | 25 | *↵
|
26 | ↵ | | 26 | @param value↵
|
| | | 27 | */↵
|
27 | public void setFilename(String value) {↵ | | 28 | public void setMimetype(String value) {↵
|
28 | fileList = null; // Force rebuild↵ | | 29 | fileList = null; // Force rebuild↵
|
29 | setFilenameProperty(value);↵ | | 30 | setMimetypeProperty(value);↵
|
30 | }↵ | | 31 | }↵
|
|
31 | private void setFilenameProperty(String value) {↵ | | 32 | private void setMimetypeProperty(String value) {↵
|
32 | if (value == null) {↵ | | 33 | if (value == null) {↵
|
33 | throw new IllegalArgumentException("Value must not be null");↵ | | 34 | throw new IllegalArgumentException("Value must not be null");↵
|
34 | }↵ | | 35 | }↵
|
35 | setProperty(FILE_NAME, value);↵ | | 36 | setProperty(MIMETYPE, value);↵
|
36 | }↵ | | 37 | }↵
|
|
37 | /**↵ | | 38 | /**↵
|
38 | * The actual name of the file to POST↵ | | |
|
39 | * @deprecated Use getHTTPFiles() array instead↵ | | 39 | * @deprecated Use getHTTPFiles() array instead↵
|
40 | */↵ | | 40 | */↵
|
41 | public String getFilename() {↵ | | 41 | public String getMimetype() {↵
|
42 | checkCount("getFilename");↵ | | 42 | checkCount("get↵
|
43 | ↵ | | 43 | Mimetype");↵
|
44 | return getFilenameProperty();↵ | | 44 | return getMimetypeProperty();↵
|
45 | }↵ | | 45 | }↵
|
|
46 | private String getFilenameProperty() {↵ | | 46 | private String getMimetypeProperty() {↵
|
47 | return getPropertyAsString(FILE_NAME);↵ | | 47 | return getPropertyAsString(MIMETYPE);↵
|
48 | | | 48 |
|