我有一个包含上传文件输入的表单,我想在发送表单上传之前选择文件时显示文件名和类型作为预览。我正在使用 nodejs express 和 pug,但不知道如何使用。
哈巴狗中的片段,输入为:
input.upload_hide#upload_document(type="file" name="myFile" required)
label.upload_label
h3 Drag your file or click to upload
i.fa-solid.fa-cloud-arrow-up
#document
谢谢!