“MIME multipart stream. MIME multipart message is

2020-07-23 04:56发布

问题:

I receive only on certain files an error when uploading to a webapi controller.

The error is "MIME multipart stream. MIME multipart message is not complete"

It seems the error is linked to some kind of not well terminated POST data but as I inspect the parameters sent from the browser with firebug everything seems ok.

This post propose a workaround that doesn't work for me. I have looked also at this

I am utilizing the MultipartFormDataStreamProvider for deserialization.

Here a link to two similar pdf documents, one working and one not. I included also the zip of another sample html5 webapi upload application coming from strathweb.com. The application will work with one doc and not the other.

回答1:

According to this discussion, it should be fixed in the next drop of ASP.NET Web API:

We have looked into this and while it does repro using the beta bits we have confirmed that the issue has been resolved in the latest bits. You can either try out the latest nightly build (see instructions here) or wait for our next drop.