-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
What is the problem this feature will solve?
This fails currently:
(await fs.open("./test/animated/87a.gif")).readableWebStream().getReader({mode:'byob'})
Uncaught:
TypeError [ERR_INVALID_ARG_VALUE]: The argument 'stream' must be a byte stream. Received ReadableStream { locked: false, state: 'readable', supportsBYOB: false }
at __node_internal_captureLargerStackTrace (node:internal/errors:484:5)
at new NodeError (node:internal/errors:393:5)
at setupReadableStreamBYOBReader (node:internal/webstreams/readablestream:2127:11)
at new ReadableStreamBYOBReader (node:internal/webstreams/readablestream:882:5)
at ReadableStream.getReader (node:internal/webstreams/readablestream:323:12)
at REPL276:1:96 {
code: 'ERR_INVALID_ARG_VALUE'
}
But a file is all about bytes and intuitively it should succeed.
What is the feature you are proposing to solve the problem?
Byte stream support for FileHandle::readableWebStream
What alternatives have you considered?
No response
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.