Skip to content

twitwi/FileAccessApplet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

######################################################
## An applet to securely grant acces to user's hard ##
## drive from a webpage (e.g. javascript app)       ##
######################################################

You can get the compiled version directly from the "release" folder of this project:
  http://github.com/twitwi/FileAccessApplet/raw/master/release/FileAccessApplet-1.0.jar

Below is a simple code snippet on how to use it.
Important notes:
 * the jar must be signed for the browser to propose additional privileges to the user (priviledge to access the file system). You can create necessary files to sign the jar by running "keytool -genkey -alias applet-key -keystore applet-keystore".

...
    <script type="text/javascript">
     function writeHello(who, where) {
            var japplet = document.getElementById("japplet");
            japplet.writeFile("Hello "+who, where);
            alert("File should have been written.");
        }
    </script>
...
    <applet id="japplet" code="com/heeere/fileaccessapplet/FacadeApplet.class" archive="target/FileAccessApplet-1.0.jar"  width="2" height="2" mayscript="true"></applet>
...

About

A simple java applet to embed in web page to access the filesystem (after the users grants access).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages