@whatwg-node/node-fetch
Advanced tools
Comparing version 0.0.2-alpha-20230202184428-e0c4cca to 0.0.2-alpha-20230202184911-724f9bd
10
index.js
@@ -299,3 +299,7 @@ 'use strict'; | ||
const [key, value] = entry; | ||
if (value instanceof PonyfillBlob) { | ||
if (typeof value === 'string') { | ||
controller.enqueue(Buffer.from(`Content-Disposition: form-data; name="${key}"\r\n\r\n`)); | ||
controller.enqueue(Buffer.from(value)); | ||
} | ||
else { | ||
let filenamePart = ''; | ||
@@ -309,6 +313,2 @@ if (value.name) { | ||
} | ||
else { | ||
controller.enqueue(Buffer.from(`Content-Disposition: form-data; name="${key}"\r\n\r\n`)); | ||
controller.enqueue(Buffer.from(value)); | ||
} | ||
if (entries.length === 0) { | ||
@@ -315,0 +315,0 @@ controller.enqueue(Buffer.from(`\r\n--${boundary}--\r\n`)); |
{ | ||
"name": "@whatwg-node/node-fetch", | ||
"version": "0.0.2-alpha-20230202184428-e0c4cca", | ||
"version": "0.0.2-alpha-20230202184911-724f9bd", | ||
"description": "Fetch API implementation for Node", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
Sorry, the diff of this file is not supported yet
76960