tags:

views:

22

answers:

1

My action is creating a large zip file (more than a gig) on the fly based on some business logic.

I can output to the response stream directly in my action. This is advantageous because I am not buffering the entire file in memory before I start streaming.

This seems to go against mvc pattern though.

Is there a way to return some type of action result without having to first buffer my entire zip file?

+3  A: 

I would do it the way you are doing it now. Patterns are meant to be followed until they don't work, at which time you implement something that does work.

Patterns are not meant to be a noose around your neck; they are there for guidance.

Robert Harvey
thanks, was hoping this isn't the case.
TimTam