Skip to content

Commit 1dd1c5e

Browse files
committed
Fixes missing filename in formdata
1 parent 7409065 commit 1dd1c5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/http.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export function request(options: HttpRequestOptions): Promise<HttpResponse> {
217217

218218
if (value.data instanceof ArrayBuffer) {
219219
const buffer = new Uint8Array(value.data as ArrayBuffer);
220-
multipartFormData.addFileParameterNameFilenameContentType(NSData.dataWithData(buffer as any), key, "", formDataPartMediaType);
220+
multipartFormData.addFileParameterNameFilenameContentType(NSData.dataWithData(buffer as any), key, value.name || "", formDataPartMediaType);
221221
} else if (value.data instanceof Blob) {
222222
// Stolen from core xhr, not sure if we should use InternalAccessor, but it provides fast access.
223223
// @ts-ignore

0 commit comments

Comments
 (0)