Skip to content

Commit

Permalink
Fix file attachment to form data
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiebremer committed Feb 24, 2024
1 parent 782e24d commit 78576bf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
10 changes: 6 additions & 4 deletions lib/Utilities.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Utilities.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions src/Utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ export namespace Utilities {
}
}
else if (
value instanceof Bridge.Blob &&
target instanceof Bridge.FormData
target instanceof Bridge.FormData &&
(
value instanceof Bridge.Blob ||
value instanceof Bridge.File
)
) {
target.append( key, value );
}
Expand Down Expand Up @@ -191,8 +194,11 @@ export namespace Utilities {
}
}
else if (
value instanceof Bridge.Blob &&
target instanceof Bridge.FormData
target instanceof Bridge.FormData &&
(
value instanceof Bridge.Blob ||
value instanceof Bridge.File
)
) {
target.append( key, value );
}
Expand Down

0 comments on commit 78576bf

Please sign in to comment.