IE - 如何将客户端图像文件读取为base64

发布于 2024-12-16 17:33:25 字数 185 浏览 2 评论 0原文

我很想知道是否有一种方法可以使用 IE8 读取本地文件(如 FF File API 那样)?我的意思是使用 Internet Explorer 8 读取图像文件并将其转换为 base64 编码,然后将其分配给 JavaScript 变量。

我知道FF中有办法,但是IE8可以吗?我找不到任何显示效果的完整片段,因此非常感谢任何有用的教程:)

I am quite interested to know if there is a way to read local files with IE8 (as FF File API does)? I mean read an image file with Internet Explorer 8 and convert it to base64 encoding then assign it to a JavaScript variable.

I know there is a way in FF, but is it possible with IE8? I couldn't find any complete snippets showing the effect, so any useful tutorial is much appreciated :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

策马西风 2024-12-23 17:33:25

IE 可以发出 AJAX 请求来获取二进制流,但它必须位于 同一域或通过服务器端代理

IE can make an AJAX request to get a binary stream, but it has to be on the same domain or go through a server-side proxy

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文