I was wondering how to send an (in my case) SqlFileStream directly to the client through our Nancy-API without loading the stream in memory.
So far I succeeded in passing the stream, but Nancy's StreamResponse copies the sourcestream (=SqlFileStream) to the outputstream which causes a massive memory increase. Where I would just like it to send the stream through.
I made this work in WebApi where WebApi was registered in the Owin-pipeline. No memory increase is noticeable, which is great when we are talking about pretty big streams (>100MB). But of course I'd rather stick to one API-application-framework if possible.
Any tips?