wisp icon indicating copy to clipboard operation
wisp copied to clipboard

Add support for the ability to stream bytes.

Open kaeedo opened this issue 3 months ago • 1 comments

This issue would be to start a discussion on how to add streaming of bytes to the wisp API. My usecase would be to stream a file from an S3 bucket through a wisp handler to return to the web client. Current workaround would be to load file into memory if it's small enough, or temporarily write it to disk and cleanup afterwards using https://hexdocs.pm/wisp/wisp.html#new_temporary_file

https://github.com/rawhat/mist has a mist.stream function that could be wrapped around or used as inspiration.

kaeedo avatar Sep 08 '25 11:09 kaeedo

Would be useful in future for sure!

Context for readers

Kai and had a chat about this on discord and opted to use presigned S3 URLs instead as it was a better fit for this use case. More use cases are wanted so please reply if you have one for an API like this!

lpil avatar Sep 08 '25 11:09 lpil