有人知道为什么这个输入接受 .php 文件扩展名吗?
(至少在最新版本的chrome中是这样)
<input type="file" accept=".doc,.pdf,.txt,.rtl">Run Code Online (Sandbox Code Playgroud)
这显然是 Mac OS 特有的错误。
我无法从我的 win10 虚拟机中重现它,但它仍然存在于 v.55.0.2861.0 canary 中。
问题似乎来自.txt. 设置此扩展名后,
就像它会接受任何文件一样。text/*
您可以为这个 chromium 问题加注星标,该问题处理相同的基础问题(具有不同的扩展名)。
<input type="file" accept=".txt">Run Code Online (Sandbox Code Playgroud)