文件上传表单要求
- method=“post”
- enctype=“multipart/form-data”
- type=“file”
@PostMapping("upload")
public void uploadd(@RequestParam("uploadfile")MultipartFile[] files){
List<String> filepathList = new ArrayList<String>();
for(MultipartFile multipartFile : files) {
String filename =multipartFile.getOriginakFilename();
filename =UUID.randomUUID().toString().reolaceAll("-","")+"_"+filename;
String filename=ossTemplate.upload(fielname,multipartFile.getInputStream());
filepathList.add(filepathList);
}
}