How to work with MultipartFile in Spring Boot?

0

I'm still in the process of uploading images, see the code below;

@PostMapping
        public String upload(@RequestParam("files[]") MultipartFile[] files) {
        System.out.println("files >>>>>>>>>>>>>>>>>>>>>>> "  + files.length);
        return "ok";

    }

I'm using the Spring Boot STS, after selecting the image using Postman the result was 0 instead of returning 1 as you can see below in the STS console ;

How do I get return 1?

    
asked by anonymous 03.10.2018 / 16:16

0 answers