有关HTML5 FileSystemAPI的一些问题 [英] Some questions about HTML5 FileSystemAPI

查看:143
本文介绍了有关HTML5 FileSystemAPI的一些问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是第一次使用用户,只是在最初的阶段弄清楚这对我是否有用,所以请原谅任何天真的问题。我使用Google Chrome。



以下是我的用例 -
用户需要将一些信息存储到我的应用程序(基于网络)可能包括他的系统上的某些文件的路径。当用户通过我的应用程序回来访问这些信息时,他应该能够点击指向他本地磁盘上这些文件的链接并打开这些文件。



现在,我们知道由于安全问题,浏览器不会允许这样做。

我有以下问题
>
HTML5 FileSystemAPI的说明表示,这将允许我们从用户磁盘的沙盒部分访问文件。
这是否意味着我的用户想要读取的文件应该只来自他的磁盘上的特定文件夹?



我们可以决定哪个位置将会? 通过文件浏览器访问Chrome的沙盒文件系统 - 我从中得到了这个想法这个问题是由chrome决定的。



如果有人能够对此进行说明,我将不胜感激。 AFAIK,FileSystem API不提供对沙箱外的文件的访问,沙箱的位置是由强制的。

浏览器。您可以使用HTML5的File API让用户上传数据,然后使用FileSystem API存储这些数据。但是,我不认为这是你想要的。



无限制地访问用户的文件系统只能通过Java applet或其他插件来实现。


I'm a first time user, just in the initial stages figuring out if this is going to be useful for me, so forgive any naive questions. I'm using Google Chrome.

Here's my use case -
The user needs to store some information to my application(web based) which may include paths to some files on his system. When the user comes back to access this information via my application, he should be able to click on the links that point to these files on his local disk and open those files.

Now, we know that browsers will not allow this due to security concerns.

I had the following questions

The description for HTML5 FileSystemAPI says that this will allow us to access files from a "sandboxed" section of the users disk. Does that mean that the files that my user wants to read should only originate from a specific folder on his disk?

Do we get to decide what that location would be? File browser access to Chrome's sandboxed filesystems - i get the idea from this question that chrome decides that.

I would appreciate if someone could throw some light on this. Thanks guys.

解决方案

AFAIK, the FileSystem API doesn't provide access to files outside the sandbox and the sandbox's location is imposed by the browser. You can use HTML5's File API to let the user upload data, and then store this data using the FileSystem API. However, I don't think this is what you want.

Unrestricted access to a user's filesystem is only possible through a Java applet or another plugin.

这篇关于有关HTML5 FileSystemAPI的一些问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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