我正在使用 Dropzone 上传文件,这是我的代码
<div>
<form id="mainDiv" class="dropzone needsclick" enctype="multipart/form-data" method="post" action="uploadFiles?type=5" role="form">
<div class="dz-message needsclick">
Drop files here or click to upload.<br />
<span class="note needsclick">(Please upload <strong>PDF, JPG, GIF, PNG, PDF</strong> files only.)</span>
</div>
</form>
</div>
<div>
<form id="recommendationDiv" class="dropzone needsclick" enctype="multipart/form-data" method="post" action="uploadFiles?type=5" role="form">
<div class="dz-message needsclick">
Drop files here or click to upload.<br />
<span class="note needsclick">(Please upload <strong>PDF, JPG, GIF, PNG, PDF</strong> files only.)</span>
</div>
</form>
</div>
上传工作正常但是我想限制上传文件的类型
<script>
Dropzone.options.dropzone = {
acceptedFiles:'image/*'
};
</script>
接受的文件似乎不起作用,它只是上传所有内容。