qq_34055515 2017-03-01 07:32 采纳率: 37.5%
浏览 1266
已采纳

grails如何修改文件上传大小限制

我用plupload上传视频,3.6M就报错
ERROR org.grails.web.errors.GrailsExceptionResolver - SizeLimitExceededException occurred when processing request:
the request was rejected because its size (3789624) exceeds the configured maximum (128000). Stacktrace follows
:

  • 写回答

2条回答 默认 最新

  • 战在春秋 2017-03-01 08:44
    关注

    在application.yml文件中设置,格式如下:

     grails:
        controllers:
            upload:
                maxFileSize: 2000000
                maxRequestSize: 2000000
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
  • qq_34055515 2017-03-01 08:55
    关注

    不行啊大兄弟,还是报错>...<

    ERROR org.grails.web.errors.GrailsExceptionResolver - SizeLimitExceededException occurred when processing request: [POST] /upload/box_tool_upload
    the request was rejected because its size (3789624) exceeds the configured maximum (128000). Stacktrace follows:
    org.springframework.web.multipart.MultipartException: Could not parse multipart servlet request; nested exception is java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (3789624) exceeds the configured maximum (128000)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_80]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_80]
    at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
    Caused by: java.lang.IllegalStateException: org.apache.tomcat.util.http.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (3789624) exceeds the configured maximum (128000)
    ... 3 common frames omitted

    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 burpsuite密码爆破
  • ¥15 关于#ubuntu#的问题,如何解决?(相关搜索:移动硬盘)
  • ¥15 scikit安装之后import不了
  • ¥15 Ros2编译一个使用opencv的c++节点的时候,报了这个错误,请问怎么解决啊
  • ¥15 人脸识别相关算法 YOLO,AI等
  • ¥15 spark问题方便加V17675797079
  • ¥15 Python代码不打印的原因
  • ¥20 微软SEAL库的安装和使用,VS2022环境配置问题
  • ¥15 数学问题也不知道那种类型的问题
  • ¥15 R作图的时候,文本框重叠了怎么办?