Reputation: 31
I am learning springboot, there is a learning project that used WangEditor(an opensource Rich Text Editor), and I am trying to use the img upload feature
when it's a single-img-upload situation:
public String imageUpload(@RequestParam(value = "file",required = false) MultipartFile files)
This code runs OK.
But when it's a multi-img-upload situation,The requestParam will be file1,file2,file3 ... MultipartFile[] does not work, so how to solve the problem?
Seems like how to get the unknown param
Upvotes: 2
Views: 82
Reputation: 31
It solved! add a param: @RequestParam Map<String, MultipartFile> allMultipartFile
Upvotes: 1