0
I’m still in the process of implementing upload images, see the code below;
@PostMapping
public String upload(@RequestParam("files[]") MultipartFile[] files) {
System.out.println("files >>>>>>>>>>>>>>>>>>>>>>> " + files.length);
return "ok";
}
I am using the STS of Spring Boot, after selecting the image using Postman the result was 0 instead of having returned 1 as you can see below in the STS console;
How do I get returns 1 ?
Assuming the input is "files", try to replace the
@RequestParam("files[]")
for@RequestParam("files")
– Duilio Benjoino
unfortunately that didn’t work.
– wladyband