uploadify 上传 大文件没有反映

大文件上传

第一步:修改uploadify参数

1             'fileSizeLimit': '0',//单个文件大小,0为无限制,可接受KB,MB,GB等单位的字符串值
2             'fileTypeDesc': '文件',//文件描述Image Files
3             'fileTypeExts': '*.zip; *.rar; *.png',//允许上传的文件类型

测试,用一个大于30M的文件,进行上传测试。

二步:修改web.config

1 <configuration>
2   <system.web>
3     <compilation debug="true" targetFramework="4.5" />
4     <!--maxRequestLength就是文件的最大字符数,最大值不能超过2个G左右,executionTimeout是超时时间--> 
5     <httpRuntime targetFramework="4.5" maxRequestLength="1073741824" executionTimeout="3600" />
6   </system.web>
7 </configuration>

第三步:添加system.webServer节点

 1 <configuration>
 2   <system.web>
 3     <compilation debug="true" targetFramework="4.5" />
 4     <!--maxRequestLength就是文件的最大字符数,最大值不能超过2个G左右,executionTimeout是超时时间-->
 5     <httpRuntime targetFramework="4.5" maxRequestLength="1073741824" executionTimeout="3600" />
 6   </system.web>
 7   <system.webServer>
 8     <security>
 9       <requestFiltering>
10         <!--修改服务器允许最大长度-->
11         <requestLimits maxAllowedContentLength="1073741824"/>
12       </requestFiltering>
13     </security>
14   </system.webServer>
15 </configuration>
本地测试到这里就可以了。如果发布 记得修改ISS的 上传文件大小
posted @ 2015-10-13 14:58  KainJC  阅读(708)  评论(0编辑  收藏  举报