我有一個FilePond專案,如果檔案型別不可接受,我正在嘗試進行驗證。
但是我在哪里可以找到我可以使用的檔案型別串列FilePond。
<FilePond
acceptedFileTypes={['image/*', 'application/pdf']}
/>
我發現了如何接受image,pdf但我仍在尋找示例代碼來接受.tiff, .docx, .txt.
有人知道怎么做嗎?
有用!
<FilePond
acceptedFileTypes={[
'image/*',
'application/pdf',
'.docx',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'text/plain',
]}
/>
uj5u.com熱心網友回復:
你可以檢查MIME 常見型別
.tiff=>image/tiff
.docx=>application/vnd.openxmlformats-officedocument.wordprocessingml.document
.txt=>text/plain
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/479157.html
