org.springframework.web.multipart.MultipartException: The current request is not a multipart request

前端 未结 3 892
轮回少年
轮回少年 2020-12-14 15:09

I am trying to send a multipart request to the server but i am getting the following exception HTTP Status 500 - Request processing failed; nested exception is org.spring

3条回答
  •  囚心锁ツ
    2020-12-14 15:51

    Try again with "headers":

    @RequestMapping(value = "/profileimageupload", headers = "content-type=multipart/*", method = RequestMethod.POST)
    

    and ajax call follow: How can I upload files asynchronously?

    I hope this helpful to you!

提交回复
热议问题