zoukankan      html  css  js  c++  java
  • 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的 上传文件大小
  • 相关阅读:
    变量作用域
    模块化编程-函数
    递归
    变量
    形参和实参
    函数返回值
    node.js+yarn环境centos7快速部署
    LINUX磁盘添加挂载
    分布式存储MINIO集群部署实例
    Docker取消默认https连接
  • 原文地址:https://www.cnblogs.com/kainjie/p/4874644.html
Copyright © 2011-2022 走看看