You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The function JSZip.file accepts as data an object of the type InputByType. Which can be stream: NodeJS.ReadableStream according to the type definitions. The documentation also states that data can be of the type NodeJS stream.
Now, I am getting the error Can't read the data of '[filename]'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ? when I provide a Readable object.
The error comes from the function prepareContent in the file lib/utils.js because the return value of exports.getTypeOf(data) is undefined. Debugging I've confirmed that data is a Readable but I see that the function exports.getTypeOf has no checks for streams. Just strings, arrays, nodebuffers, uint8arrays and arraybuffers.
I have also noticed that the value exports.nodestream from lib/support.js is not used anywhere.
So, is it an unfinished feature? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
The function
JSZip.file
accepts as data an object of the typeInputByType
. Which can bestream: NodeJS.ReadableStream
according to the type definitions. The documentation also states thatdata
can be of the typeNodeJS stream
.Now, I am getting the error
Can't read the data of '[filename]'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?
when I provide aReadable
object.The error comes from the function
prepareContent
in the filelib/utils.js
because the return value ofexports.getTypeOf(data)
isundefined
. Debugging I've confirmed thatdata
is aReadable
but I see that the functionexports.getTypeOf
has no checks for streams. Just strings, arrays, nodebuffers, uint8arrays and arraybuffers.I have also noticed that the value
exports.nodestream
fromlib/support.js
is not used anywhere.So, is it an unfinished feature? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered: