是否可以在使用application/x-www-form-urlencoded时上传文件?我正在遵循html代码,但它只是上传/发送表单字段,而不是真正的文件上传。
<form name="form1" method="post" action="api/upload">
<div>
<label for="caption">Image Caption</label>
<input name="caption" type="text" />
</div>
<div>
<label for="image1">Image File</label>
<input name="image1" type="file" />
</div>
<div>
<input type="submit" value="Submit" />
</div>
</form>发布于 2015-02-18 11:41:58
According to W3,当在提交中包含文件时,您应该使用multipart/form-data。
https://stackoverflow.com/questions/28575520
复制相似问题