Closed jaydenseric closed 4 years ago
It should be possible to .append() a Blob instance to a FormData instance, without having to provide a third filename argument:
.append()
Blob
FormData
The default filename for Blob objects is "blob". — https://developer.mozilla.org/en-US/docs/Web/API/FormData/append
This line assumes a filename exists:
https://github.com/octet-stream/form-data/blob/73d5f4dbffab6f6a27f26c6611e32662c98c2891/src/lib/FormData.mjs#L264
Which causes a Node.js path.basename() error:
path.basename()
The "path" argument must be of type string. Received undefined
Hi! Thank you for the feedback. I will take a look and fix it as soon as I can.
This should be fixed in v2.1.1
It should be possible to
.append()
aBlob
instance to aFormData
instance, without having to provide a third filename argument:This line assumes a filename exists:
https://github.com/octet-stream/form-data/blob/73d5f4dbffab6f6a27f26c6611e32662c98c2891/src/lib/FormData.mjs#L264
Which causes a Node.js
path.basename()
error: