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