Servlet、SpringMVC、SpringBoot文件上传
1、文件上传的概述
文件上传是项目开发中最常见的功能之一 。
如果要使用文件上传,必须要有如下东西:
要有一个form标签,method=post请求;
form标签的encType属性值必须为multipart/form-data值;
在form标签中使用<input type=file />添加上传的文件;
2、文件上传,HTTP 协议的说明
Content-Type: multipart/form-data; boundary=----XXXXXX
Content-Type:表示提
原创
2020-10-19 16:59:46 ·
117 阅读 ·
0 评论