我試圖只匯入.py和.json檔案,并通過接受作為
text/x-python-script, application/json, text/x-python
在 Windows 作業系統中,只能.json匯入python檔案而不是檔案。
uj5u.com熱心網友回復:
傳遞 python 檔案的檔案擴展名而不是 MIME 型別
<input type="file" accept="application/json,.py" />
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/370684.html
標籤:javascript Python 文件 输入 上传
