MultipartException: Current request is not a multipart request

后端 未结 7 1016
一整个雨季
一整个雨季 2020-12-13 09:36

I am trying to make a restful controller to upload files. I have seen this and made this controller:

@RestController
public class MaterialController {

             


        
7条回答
  •  别那么骄傲
    2020-12-13 09:41

    When you are using Postman for multipart request then don't specify a custom Content-Type in Header. So your Header tab in Postman should be empty. Postman will determine form-data boundary. In Body tab of Postman you should select form-data and select file type. You can find related discussion at https://github.com/postmanlabs/postman-app-support/issues/576

提交回复
热议问题