h3 icon indicating copy to clipboard operation
h3 copied to clipboard

Incompatible streams with raw values from unstorage when used in `sendStream`

Open GalacticHypernova opened this issue 1 year ago • 0 comments

Environment

N/A

Reproduction

https://github.com/GalacticHypernova/NuxtFailTest

Steps:

  1. npm install
  2. npm run dev
  3. navigate to localhost:3000/images/Test2.jpg
  4. profit

Describe the bug

When sending streams of images using sendStream, it complains that the stream of the item is not compatible. That is beause, from what I understood, it takes the raw file content which is a buffer of bytes, and the sendStream function expects an object with pipe or pipeTo properties.

Additional context

This doesn't occur when using createReadStream from node:fs

Logs

No response

GalacticHypernova avatar Jan 20 '24 18:01 GalacticHypernova