lishunli / nutz

Automatically exported from code.google.com/p/nutz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MVC: UploadAdapter文件大小限额

GoogleCodeExporter opened this issue · comments

既然不考虑框架的全局配置文件,那UploadAdapter是否可以增加�
��个参数用来限制上传文件的
大小呢?

Original issue reported on code.google.com by jiongs...@gmail.com on 21 May 2010 at 2:13

虽然可以通过:
<Connector  maxPostSize="0"/>
来控制上传文件的大小,但是在 UploadAdaptor 
中应该支持一个最大值。

如果 HTTP 的 Content-length 
超过了这个最大值,将抛出异常,转到 @Fail 视图

Original comment by zozoh...@gmail.com on 21 May 2010 at 3:03

  • Added labels: Module-Mvc
  • Removed labels: ****
按照 oοΟ大文 的建议,还应该增加文件名后缀的过滤

Original comment by zozoh...@gmail.com on 10 Aug 2010 at 3:18

  • Added labels: ****
  • Removed labels: ****
Issue 249 has been merged into this issue.

Original comment by zozoh...@gmail.com on 19 Aug 2010 at 4:16

  • Added labels: ****
  • Removed labels: ****
fixed in r1479

JUnit:

  org.nutz.mvc.upload.unit.UploadingUnitTest
    > test_limit_file_content_type_fail
    > test_limit_file_name_fail
    > test_limit_file_size_ok
    > test_limit_file_size_fail
    > test_upload_ignore_null

Original comment by zozoh...@gmail.com on 19 Aug 2010 at 4:17

  • Added labels: Milestone-1.a.32
  • Removed labels: ****

Original comment by zozoh...@gmail.com on 19 Aug 2010 at 4:18

  • Changed state: Fixed
  • Added labels: ****
  • Removed labels: ****