我正在创建一个HTML表单以上传图像以及一些文本。我使用POST将图像传递到后端的Express(节点),但是该表单中的其他参数未显示在URL中。形式如下:
<div class="container" id="mainInfo">
<form class="form-horizontal" method="post" enctype="multipart/form-data" action="/meme-api/pst/upload/idis2138726387163876128376127386128321/sender/goNOW/jque/18721/">
<div class="form-group">
<label for="text" class="col-sm-2 control-label">Description</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputEmail3" name="memedesc" placeholder="Add a description...">
</div>
</div>
<div class="form-group">
<label for="text" class="col-sm-2 control-label">Tags</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="inputEmail3" name="memetags" placeholder="Add tags">
</div>
</div>
<div class="form-group">
<label for="image" class="col-sm-2 control-label">Meme</label>
<div class="col-sm-10">
<input type="file" class="form-control-file" name="meme" id="memeFile">
</div>
</div>
<div class="col-sm-offset-2 col-sm-10">
<button type="submit" class="btn btn-default">Post Meme</button>
</div>
</div>
</form>
</div>
注意:使用Bootstrap