Skip to content

Commit 5e7cc20

Browse files
committed
chore: actually send formData
1 parent 4119eaa commit 5e7cc20

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

dist/index.js

Lines changed: 7 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/upload.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ export async function upload({
4545
// formData['dry-run'] = dryRun
4646
// }
4747

48-
const body = Object.entries(formData)
49-
.flatMap(
50-
([key, value]) =>
51-
`${encodeURIComponent(key)}=${encodeURIComponent(value)}`
52-
)
53-
.join('&')
48+
// const body = Object.entries(formData)
49+
// .flatMap(
50+
// ([key, value]) =>
51+
// `${encodeURIComponent(key)}=${encodeURIComponent(value)}`
52+
// )
53+
// .join('&')
5454

5555
const response = await fetch(`${baseUrl}/v1/specs`, {
56-
body,
56+
body: formData,
5757
headers: {
5858
Authorization: `Bearer ${heyApiToken}`,
5959
'Content-Type': 'multipart/form-data'

0 commit comments

Comments
 (0)