Home > Back-end >  @ RequestParam springboot receive front-end documents (" file ") MultipartFile serviceFile
@ RequestParam springboot receive front-end documents (" file ") MultipartFile serviceFile

Time:09-17

I have been trying to place out first:

With an error message:

The same interface in another controller is I wrote it again, the postman tested can receive the file, I've tested after copy to now the controller cannot have instead, this is my last to transfer through the interface of the

, then I don't know where to search, @ RequestParam (" file ") this annotation is sure to add, don't add breakpoints can enter the interface, just receive parameters is null, add the annotations directly submitted to the above error, baidu did not find relevant solutions, a great god go over help have a look

CodePudding user response:

Seems to be behind the postMapping add consumes=MediaType. MULTIPART_FORM_DATA_VALUE

CodePudding user response:

The post man submitted to figure out the parameters of the concrete interface

CodePudding user response:

Should be your front end and there is a problem, I guess

CodePudding user response:

The front and there is a problem,
  • Related