Skip to content

Commit 0e4f5f2

Browse files
author
radeva
authored
Merge pull request #69 from sud80/ios_fixes
Fix filename for multipart upload
2 parents 082dcdc + 505a510 commit 0e4f5f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nativescript-background-http/background-http.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class MultiMultiPartForm {
317317
if (!this.fields[i].filename) {
318318
results += CRLF + CRLF + this.fields[i].value + CRLF;
319319
} else {
320-
results += '; filename="' + this.fields[i].filename + '"';
320+
results += '; filename="' + this.fields[i].destFilename + '"';
321321
if (this.fields[i].mimeType) {
322322
results += CRLF + "Content-Type: " + this.fields[i].mimeType;
323323
}
@@ -338,7 +338,7 @@ class MultiMultiPartForm {
338338

339339
}
340340
// Add final part of it...
341-
results += CRLF + "--" + this.boundary + "--" + CRLF;
341+
results += "--" + this.boundary + "--" + CRLF;
342342
tempString = NSString.stringWithString(results);
343343
newData = tempString.dataUsingEncoding(NSUTF8StringEncoding);
344344
combinedData.appendData(newData);

0 commit comments

Comments
 (0)