How to solve the problem when the control attachment upload large attachments can not be uploaded

Due:

Our attachment control inside, the size of the default settings in general as 10M, 30M if we set up the situation, we can not meet uploaded.

 

the reason:

Because a file ajax's take our custom-sized control value we can not get to. Because we pass an int, so when we take a QueryString value Null.

 

solve:

Open Portal-> Ajax-> FileUploadHandler.ashx file, locate the following code:

ProtectedintMaxSize

get

   { 

if(!int.TryParse(Request.QueryString["MaxSize"],Out _maxSize))

        { 

             _maxSize = 10 * 2014;

        } 

return_maxSize; 

   } 

We put the corresponding Request judging portion into the following code:

Request.Params["MaxSize"]

You can implement a custom attachment upload control properties.
Figure shows the effect:
http://bbsres2.ncmem.com/eb5b1b6b.jpg
to learn more about can refer me to write this article: http://blog.ncmem.com/wordpress/2019/08/12/%e5%a6%82%e4%bd%95%e8%a7% a3% e5% 86% b3% e6% 8e% a7% e4% bb% b6% e9% 99% 84% e4% bb% b6% e4% b8% 8a% e4% bc% a0% e6% 97% b6% e8% b6% 85% e5% a4% a7% e9% 99% 84% e4% bb% b6% e6% 97% a0% e6% b3% 95% e4% b8% 8a% e4% bc% a0% e7% 9a% 84% e9% 97% ae% e9% a2% 98 /

Guess you like

Origin www.cnblogs.com/songsu/p/11346247.html