Browser application & local file system access

2019-01-15 18:30发布

问题:

I want to enhance my browser-based web application with functionality that enables management of local files and folders. E.g. folder tree structures should be synchronized between local workstation and server via HTTP(S).

I am aware of security-related limitations in browser-based applications. However, there are some techniques that "work around" these issues:

  • Signed Java applets (full trust)
  • .NET Windows Forms browser controls (no joke, that works. Just the configuration is horrible)
  • ActiveX

My question is: What do you use/suggest, both technology and implementation practice? Key requirement is that the installation process is as simple as possible.

Thanks for your opinions!

回答1:

Google Gears.

it lets you write Javascript applications with a much bigger platform support than the usual browser, and go 'unconnected' with local file access, cache and DB. and if/when connected it syncs to the central server.

available for several browsers on all platforms; but still under heavy evolution.



回答2:

Both Gears and Adobe Air require the user to manually select a local file before you get any programmatic access. Very limited because of security considerations when it comes to local filesystem access, so no chance for any web based file sync type functionality there as far as I can see. Maybe I'm wrong about Adobe Air but this is definitely the case with gears. But If I'm wrong let me know!



回答3:

Silverlight 4 (still in beta) allows file system access:

"Read and write files to the user’s MyDocuments, MyMusic, MyPictures and MyVideos folder (or equivalent for non-windows platforms) for example storage of media files and taking local copies of reports"

http://www.silverlight.net/getstarted/silverlight-4/



回答4:

Definitely not ActiveX. No sense spending time on something that out-of-date.



回答5:

Adobe AIR (essentially, Flash for the Desktop), is something that we considered in my last contract, as opposed to Java applets. Last I checked, though it's been several months, the installation of the AIR runtime environment was fast and easy



回答6:

Your best bet might be to write a custom application that interacts with your web application. For example, Dropbox lets you synchronize files across computers by use of a background application that watches a Dropbox-enabled folder. It also lets you view your Dropbox files online through a web browser. The Dropbox web application then allows you to delete/move/copy files which is echoed in your local filesystem.



回答7:

In the demo of Google Wave...

http://www.youtube.com/watch?v=v_UyVmITiYQ&fmt=18

...at 15:30 in, a group of img files are drag-and-dropped from the file system to the browser. The functionality is attributed to Google Gears. This seems a bit different from what Daniel OCallaghan and the official documentation suggest is possible.

Anybody know what's actually possible w/ Google Gear and the local file system?