Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ece35e6 commit cc317f8Copy full SHA for cc317f8
src/com/alexbbb/uploadservice/FileToUpload.java
@@ -39,6 +39,7 @@ public FileToUpload(final String path,
39
this.file = new File(path);
40
this.paramName = parameterName;
41
this.contentType = contentType;
42
+
43
if (fileName == null || "".equals(fileName)) {
44
this.fileName = this.file.getName();
45
} else {
@@ -61,10 +62,10 @@ public byte[] getMultipartHeader() throws UnsupportedEncodingException {
61
62
.append(NEW_LINE);
63
64
if (contentType != null) {
- builder.append("Content-Type: ")
65
- .append(contentType)
66
- .append(NEW_LINE);
67
- }
+ builder.append("Content-Type: ")
+ .append(contentType)
+ .append(NEW_LINE);
68
+ }
69
70
builder.append(NEW_LINE);
71
0 commit comments