Baidu WebUploader uploading and downloading technology for large files (above 100M)

Cause:

In our attachment control, the default size is generally 10M. If we set 30M, uploading will not be satisfied.

 

the reason:

It is because we take the value of the custom size of our control in a file of our ajax, which cannot be obtained. Because we passed the value of type int, the value when we fetched with QueryString is Null.

 

solve:

Open the Portal->Ajax->FileUploadHandler.ashx file and find the following code:

ProtectedintMaxSize

get

   { 

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

        { 

             _maxSize = 10 * 2014;

        } 

return_maxSize; 

   } 

We replace the above corresponding Request judgment part with the following code:

Request.Params["MaxSize"]

You can implement custom attachment upload control properties.
Effect display diagram: For
http://bbsres2.ncmem.com/eb5b1b6b.jpg
details, please refer to this article I wrote: 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 blog.csdn.net/weixin_45525177/article/details/108517704