Skip to content

Commit cb5d78e

Browse files
committed
Fixed JSON response max size problem to support "smart" download previews.
1 parent 1e40fad commit cb5d78e

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed
-573 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

jQuery-File-Upload.MVC3/Upload/UploadHandler.ashx.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ namespace jQuery_File_Upload.MVC3.Upload
1111
/// </summary>
1212
public class UploadHandler : IHttpHandler
1313
{
14-
private readonly JavaScriptSerializer js = new JavaScriptSerializer();
14+
private readonly JavaScriptSerializer js;
1515

1616
private string StorageRoot
1717
{
1818
get { return Path.Combine(System.Web.HttpContext.Current.Server.MapPath("~/Files/")); } //Path should! always end with '/'
1919
}
2020

21+
public UploadHandler()
22+
{
23+
js = new JavaScriptSerializer();
24+
js.MaxJsonLength = 41943040;
25+
}
26+
2127
public bool IsReusable { get { return false; } }
2228

2329
public void ProcessRequest(HttpContext context)

0 commit comments

Comments
 (0)