Sending large files? #233
-
Is there any way to send large files with Grapevine (well, respond with them) without loading the entire file into memory first? OutputStream seems to be what I'm looking for but there's not much documentation on it... do I need to add any headers, etc first for instance? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There are several overloads of So, you could use Honestly, Grapevine 5 does a much better job of this. |
Beta Was this translation helpful? Give feedback.
There are several overloads of
HttpResponse.SendResponse()
that will take a stream as a first parameter. Take a look at those, if you don't also pass in the ContentType and Encoding, you will have to set those on the response object yourself.So, you could use
FileStream
orMemoryStream
or which ever stream meets your specific needs.Honestly, Grapevine 5 does a much better job of this.