文件上传时显示The request sent by the client was syntactically incorrect ()

前端页面涉及到文件上传的时候,标签中不只需要action属性,还需要添加enctype="multipart/form-data"以及规定提交方式method=“post”,即:

<form name="documentInsert"enctype="multipart/form-data"method="post"onsubmit="return checkform();"action="document/insertDocument">

否则浏览器端会显示HTTP Status 400 的错误,并提示The request sent by the client was syntactically incorrect ()。

猜你喜欢

转载自blog.csdn.net/llc950819/article/details/84454167