Browse Source

Merge pull request #185 from hhravn/Issue-183

Quote filename
wkh237 8 years ago
parent
commit
e831531a61
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java

+ 1
- 1
src/android/src/main/java/com/RNFetchBlob/RNFetchBlobBody.java View File

196
             // form begin
196
             // form begin
197
             String header = "--" + boundary + "\r\n";
197
             String header = "--" + boundary + "\r\n";
198
             if (field.filename != null) {
198
             if (field.filename != null) {
199
-                header += "Content-Disposition: form-data; name=\"" + name + "\"; filename=" + field.filename + "\r\n";
199
+                header += "Content-Disposition: form-data; name=\"" + name + "\"; filename=\"" + field.filename + "\"\r\n";
200
                 header += "Content-Type: " + field.mime + "\r\n\r\n";
200
                 header += "Content-Type: " + field.mime + "\r\n\r\n";
201
                 os.write(header.getBytes());
201
                 os.write(header.getBytes());
202
                 // file field header end
202
                 // file field header end