@kolbo/mcp 1.3.1 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/client.js +6 -6
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -267,16 +267,16 @@ class KolboClient {
|
|
|
267
267
|
...formData.getHeaders()
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
// Serialize form-data to a Buffer before passing to fetch(). Node's
|
|
271
|
+
// built-in fetch (undici) can't consume legacy Node.js streams from
|
|
272
|
+
// the `form-data` package, causing "fetch failed" on local file uploads.
|
|
273
|
+
const body = formData.getBuffer();
|
|
274
|
+
headers['Content-Length'] = String(body.length);
|
|
274
275
|
|
|
275
276
|
const response = await fetch(url, {
|
|
276
277
|
method: 'POST',
|
|
277
278
|
headers,
|
|
278
|
-
body
|
|
279
|
-
duplex: 'half'
|
|
279
|
+
body
|
|
280
280
|
});
|
|
281
281
|
|
|
282
282
|
let data;
|