jQuery-File-Upload.MVC3
jQuery-File-Upload.MVC3 copied to clipboard
Setting maxMessageLength local to a specific controler on MVC 4
Hi
Thank you very much for the work you are doing. I am attempting to use this in an MVC 4 based web site and need to do very large uploads, possibly up to 1GB video files of training sessions. In addtion I would like to have a number of descriptive fields to be used in a database go along with the upload.
Basicly the use case is as follows;
A small form where the admin selects a file (possibly as large as 1GB), enters a title value (not filename), a description, a few file type classifiers (archive, video, etc...). Upon submission all the data is sent. When the server succesfully finalizes the storage of the upload a database entry is added to the DB with the associated info. In the case of upload failure no DB entry is made and the admin is notified.
I would like to keep the concept in MVC and not use a HTTPHandler if possible(personal bias). I could easily create the File upload functions on a dedicated controler with its own associated security since this is only for the site admin to use. The issue seems to be around the maxMessageLength in MVC. I agree that it is a bad idea to set a huge maxMessageLength value for the entire site, but would it be possible to set an apropriate value on a location for JUST that controler? I have been beating my head against the wall on this issue and was hoping you had some thoughts.
I am doing this all in VS 2012 with .NET 4.5 & MVC 4 and the site is running on IIS 7.5.
Thanks, Doug
See this stackoverflow question to find out how you can assign maxRequestLength per controller action