SPRING REST: The request was rejected because no multipart boundary was found

后端 未结 4 1177
别跟我提以往
别跟我提以往 2020-12-03 13:26

I did a POC for spring 3 rest multipart file upload. Its working fine. But when i tried integrating with my application i am facing issues.

It throws following exce

4条回答
  •  一整个雨季
    2020-12-03 14:13

    The problem isn't in your code - it's in your request. You're missing boundary in your multipart request. As it said in specification:

    The Content-Type field for multipart entities requires one parameter, "boundary", which is used to specify the encapsulation boundary. The encapsulation boundary is defined as a line consisting entirely of two hyphen characters ("-", decimal code 45) followed by the boundary parameter value from the Content-Type header field.

    This and this posts should also be helpful.

提交回复
热议问题