Ste*_*ota 2 html html5 google-chrome file-upload input
我有简单的上传文件输入,它只接受.class文件:
<input type="file" accept=".class">
Run Code Online (Sandbox Code Playgroud)
问题是,accept property(accept=".class")导致Chrome中的对话框打开速度非常慢,有时甚至需要10秒钟,但它在Mozilla Firefox和Internet Explorer中运行良好.我正在使用最新版本的Chrome - 53.0.2785.116 m (64-bit).我觉得这很愚蠢,因为其他扩展程序也可以在Chrome中完美运行.我已经阅读了类似问题的其他问题,其中一些建议添加name属性可以解决问题,但在这种情况下它没有帮助.问题很容易重现,你只需要我提供的代码行.
编辑:
谷歌今天发布了一个更新 - 53.0.2785.143似乎已经解决了这个问题.
这是Chrome版本中的已知回归错误52.0.2743.116.
临时解决方法是使用mime类型并且是显式的(没有通配符).Ex替换:
<input type="file" name="images[]" multiple="multiple" accept="image/*">
有:
<input type="file" name="images[]" multiple="multiple" accept="image/gif, image/png, image/jpeg, image/bmp, image/webp">
要解决您的具体问题,这应该工作:
<input type="file" accept="application/java-vm">每个mime类型列表
| 归档时间: |
|
| 查看次数: |
2343 次 |
| 最近记录: |