apache fileupload源码分析
#文件上传格式 先来看下含有文件上传时的表单提交是怎样的格式 <form action="/upload/request" method="POST" enctype="multipart/form-data" id="requestForm"> <input type="file" name="myFile"> <input type="text" name="user"> <input type="text" name="password"> <input type="submit" value="提交"> </form> form表单提交内容如下 从上面可以看到,含有文件上传的格式是这样组织的。 文件类型字段 ------WebKitFormBoundaryCvop2jTxU5F6lj6G(分隔符) Content-Disposition: form-data; name="myFile"; filename="资产型号规格模板1.xlsx" Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (换行) (文件内容) 其他类型字段 ------WebKitFormBoundaryCvop2jTxU5F6lj6G(分隔符) Content-Disposition: