Open lucasrmendonca opened 8 months ago
did you ever get this working?
Nope, I went with Open.file
instead of Open.url
since the latter seems to only work with the "requests" library and I didn't want to install an extra dependency just for that
It would make sense to move to fetch (ideally with backward compatibility for request)
I was also looking for that because request
is now deprecated and also has an open CVE.
Open to PRs, if not I will find time to do this at some point, hopefully soon!
I just stumbled on this issue.
It's not a complete solution, but I have a start of an implementation with fetch in this issue https://github.com/ZJONSSON/node-unzipper/issues/309#issue-2267169008. I needs better error handling which I am struggling with.
I was able to hack something together using got but found it unreliable for my use case bc of the location of the central directory at the end of the zip file.
May I ask whether the .url method would have any benefits compared to .buffer()?
Am I write that the received directory variable would be of same size regardless whether .url() or .buffer() is used? In this case, the only benefit for .url() would be to save memory in avoiding the zip file fully loaded to a buffer first?
How do I use Open.url with native "fetch" on Node.js v20.9.0 ?