views:

774

answers:

2

I've seen some posts regarding access to files on a client machine by a webpage, namely this question.

I'm trying to hop on the "continuously update in the cloud" paradigm for some algorithms I am writing so my users can access the latest versions by simply accessing the webpage. This requires that the program/webpage can start with a directory and recursively inspect files within it and compute results based on what is found. In the end it also should be able to write the results file to the client's filesystem.

One of the answers in that previous question mentions Google Gears but that has since been discontinued in favor of HTML5. Is access to a client directory possible within HTML5? How?

I know why access by any webpage to local files is a security risk, but for my purpose I have no problem to ask the user for the appropriate permissions.

+3  A: 

No, you can't - at least not at the moment*. However, you can use HTML 5's offline storage API to access data/files that you have created yourself (provided that the browser supports the feature and the user presses Allow).

*Since Firefox 3.6, you will be able to use the the File API that supports drag & dropping of files from the client computer to the browser, and then read the contents. The API also defines a way to read the contents of files in input fields which have "file" -type.

Kai Sellgren
+1  A: 

Chrome 6 also will support the File API

Vanuan