0

what is the best way to append data onto a file download? I figure that i can make my own class that implements InputStream and just consolidates two input streams (the file first, my additional data to append second.) but is there an existing view class that i can use to just return an InputStream or will i have to roll my own view class as well?

1
  • What kind of data do you want to append? Commented May 11, 2010 at 12:27

1 Answer 1

1

I think what you are looking for is a custom ActionResult class. I don't think you can get around writing your own ActionResult.

Phil Haack wrote about that here: http://haacked.com/archive/2008/05/10/writing-a-custom-file-download-action-result-for-asp.net-mvc.aspx

You just should not use HttpContext.TransmitFile but rather, write a byte array to the response.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.