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的 上传文件大小

转载于:https://www.cnblogs.com/kainjie/p/4874644.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值