IE 11: Error while sending Multipart Form Data request: Stream ended unexpectedly

前端 未结 4 1271
挽巷
挽巷 2021-02-08 14:05

I am trying to upload files along with some other form fields using jQuery AJAX calls.

This is a common function that calls the URL on the server:

functi         


        
4条回答
  •  一整个雨季
    2021-02-08 14:32

    Turned out a weird issue. This is how it's resolved.

    • We had checkboxes at the end of the form. The mentioned issue was occurring when we do not select any of the checkboxes. The request was not getting formed correctly and hence server threw error.
    • Added a hidden field at the end of the form (make sure this is the last form field) and assigned some value to it.

    That' it. Worked like a magic!

    More info here.

提交回复
热议问题