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

待我称王封你为后i 2022-04-14 05:07 244阅读 0赞

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

  1. <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 ()。

发表评论

表情:
评论列表 (有 0 条评论,244人围观)

还没有评论,来说两句吧...

相关阅读