在IE和Safari文件()构造函数 [英] File() constructor in IE and Safari

查看:165
本文介绍了在IE和Safari文件()构造函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

文件()构造函数是不是在IE和Safari支持。 CanIUse

The File() constructor is not supported in IE and Safari.CanIUse

有没有一个很好的解决这个在角/ JavaScript的?

Is there a nice solution to this in Angular/JavaScript?

var file = new File(byteArrays, tempfilename, { type: contentType });

我可以创建在其他方面的文件,由IE支持的Safari浏览器?

Could I create the file in other ways, that is supported by IE an Safari?

推荐答案

如果您确实希望或需要使用文件API,还有的莫邪填充工具通过 CanIUse 建议。

If you absolutely want or need to use the File API, there's mOxie polyfill suggested by CanIUse.

这篇关于在IE和Safari文件()构造函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆