New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on createReadStream(buffer) #18794
Comments
I can not reproduce this on Linux. Would you be so kind and show a stack trace? |
console.log(buffer);
fs.createReadStream(buffer);
|
@tobq The buffer in this case refers to a path string that's encoded as a buffer. It doesn't seem that the buffer you have is a path given all the null bytes. |
Yes, I did some reading and realised it was expecting paths in buffer form, not data buffers. |
I am facing the same issue, please share how did you resolve it? |
I am facing the same issue |
relevant?
|
As I explained, the API is expecting a path. It's misleading in that it isn't creating a readable-stream from a data-buffer. |
is there a way to create a ReadStream from a data buffer in node? I too was mislead by this looking to create a stream from a data buffer |
// There is a way to create a ReadStream from a data buffer in node. |
Error [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string without null bytes. Received type object
The text was updated successfully, but these errors were encountered: