Home > Back-end >  Vue springboot back-end data transfer error Current request is not a multipart request
Vue springboot back-end data transfer error Current request is not a multipart request

Time:09-27

Himself as a small white one, doing the vue front-end to back-end send post data, error Current request is not a multipart request, in adding headers axios: {" content-type: "multipart/form - data"}, the error Could not parse multipart servlet request, the request was rejected because no multipart boundary was found,
Screenshots:
Vue:

Springboot error:
Add the headers
09:02:09 [HTTP - nio - 88 - exec - 8] ERROR C.B.C.E xception. BDExceptionHandler - Could not parse multipart servlet request; Nested exception is Java. IO. IOException: org.. Apache tomcat. Util. HTTP. Fileupload. FileUploadException: the request was rejected because no multipart boundary was found
Org. Springframework. Web. Multipart. MultipartException: Could not parse multipart servlet request; Nested exception is Java. IO. IOException: org.. Apache tomcat. Util. HTTP. Fileupload. FileUploadException: the request was rejected because no multipart boundary was found
Don't add headers

The comments part of the add don't add is the same error,
Big help, genuflect is begged card for a day, meowed ~

CodePudding user response:

No one? His top! D=====( ̄ del  ̄ *) b

CodePudding user response:

Now through the yao

CodePudding user response:

@ RequestMapping (value=https://bbs.csdn.net/topics/("/save "), and headers=(" the content-type=multipart/* "), the method=RequestMethod. POST), plus the header of the vue inside cut out and then give it a try

CodePudding user response:

Multipart/form - the data is transferring files with text

CodePudding user response:

The
reference 3/f o raccoon dog, response:
@ RequestMapping (value=https://bbs.csdn.net/topics/("/save "), and headers=(" the content-type=multipart/* "), the method=RequestMethod. POST), the inside of the vue add the header to remove then try
or errors with the header

CodePudding user response:

reference 4 floor tianfang response:
multipart/form - the data is transferring files with text can
didn't add will quote didn't add the header mistake, because I have submitted form

CodePudding user response:

https://www.jianshu.com/p/b66aa55c99f7

CodePudding user response:

Is there any other way - or not solve awsl

CodePudding user response:

Front end brother do? I'm in the back end, don't do the project together
  • Related