Browse files

Fixed JSON response max size problem to support "smart" download prev…

…iews.
  • Loading branch information...
1 parent 1e40fad commit cb5d78e292cf68fd128985ee42861773275ec7e0 @maxpavlov committed Mar 29, 2012
View
BIN jQuery-File-Upload.MVC3/Files/FileUploader.zip
Binary file not shown.
View
BIN jQuery-File-Upload.MVC3/Files/i-e-b-jQueryFileUpload.Net-ac21fc1 (1).zip
Binary file not shown.
View
BIN jQuery-File-Upload.MVC3/Files/tracker-code-2011.04.26.zip
Binary file not shown.
View
8 jQuery-File-Upload.MVC3/Upload/UploadHandler.ashx.cs
@@ -11,13 +11,19 @@ namespace jQuery_File_Upload.MVC3.Upload
/// </summary>
public class UploadHandler : IHttpHandler
{
- private readonly JavaScriptSerializer js = new JavaScriptSerializer();
+ private readonly JavaScriptSerializer js;
private string StorageRoot
{
get { return Path.Combine(System.Web.HttpContext.Current.Server.MapPath("~/Files/")); } //Path should! always end with '/'
}
+ public UploadHandler()
+ {
+ js = new JavaScriptSerializer();
+ js.MaxJsonLength = 41943040;
+ }
+
public bool IsReusable { get { return false; } }
public void ProcessRequest(HttpContext context)

0 comments on commit cb5d78e

Please sign in to comment.