浏览器加载本地文件而不上传 [英] browser load local file without upload

查看:196
本文介绍了浏览器加载本地文件而不上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在不上传到浏览器的情况下编辑本地文件?

Is it possible to edit a local file without uploading to the browser?

假设客户端有HTML文件,我希望他能够使用我的文件网站的javascript编辑文件而不上传它。这可能吗?

Let's say the client has an HTML file, I want him to be able to use my site's javascript to edit the file without uploading it. Would this be possible?

谢谢。

推荐答案

是的,它是可能的,但仅限于HTML5(并且只有当浏览器添加对它的支持时......并非所有人都支持),您可以在此处找到HTML5文件API

Yes, it is possible, but only in HTML5 (and only as browsers add support for it...not all do yet), you can find the HTML5 File API here.

请注意,用户必须授予访问该文件的权限,来自第5.9节

Note that the user has to give permission to access the file, from Section 5.9:


一旦用户授予权限,用户代理应该能够以编程方式直接从本地文件中读取和解析数据。

Once a user has given permission, user agents should provide the ability to read and parse data directly from a local file programmatically.

这篇关于浏览器加载本地文件而不上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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