COS 2017.5 发布,Java文件上传组件

栏目: Java · 发布时间: 9年前

内容简介:COS 2017.5 发布,Java文件上传组件

老牌轻量级 java web 文件上传组件 cos 已多年未更新过,cos-2017.5 版本根据 JFinal 用户反馈比较多的几个需求进行了升级:

1:支持文件上传表单域使用同名的 name属性

<form action="/upload" method="POST" enctype="multipart/form-data">
  <input type="file" name="aaa"/>
  <input type="file" name="aaa"/>
  <input type="file" name="aaa"/>
  <input type="submit" value="提交" />
</form>

上例中的 input 表单域的 name属性全部为 "aaa",cos-2017.5 版本对此提供了支持

2、getFiles() 获取上传文件时保持住上传文件的次序

老版本获取到的 fileList 的次序是不确定的

3、支持上传文件在超出尺寸时抛出 ExceededSizeException

老版本早已有了这个异常类型,但实际的代码中并未使用过这个异常类。使用这个异常,方便通过 try catch 捕获到,并给客户端一个合理的响应

4、maven 升级坐标:

<dependency>
  <groupId>com.jfinal</groupId>
  <artifactId>cos</artifactId>
  <version>2017.5</version>
</dependency>

5、非maven用户可以在 jfinal官网下载 jfinal-3.1-all.zip 这个文件,里面有 cos-2017.5.jar 

6、所有 jfinal 版本可以直接升级到 cos-2017.5.jar,代码无需做任何改动


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Web Security Testing Cookbook

Web Security Testing Cookbook

Paco Hope、Ben Walther / O'Reilly Media / 2008-10-24 / USD 39.99

Among the tests you perform on web applications, security testing is perhaps the most important, yet it's often the most neglected. The recipes in the Web Security Testing Cookbook demonstrate how dev......一起来看看 《Web Security Testing Cookbook》 这本书的介绍吧!

html转js在线工具
html转js在线工具

html转js在线工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具