Wednesday, November 17, 2010

DavDrive & DAVCommander

DavDrive allows the browsing of the filesystem from a browser, but this is not very comfortable and does not allow for file upload, file deletion or to create and delete directories.

DAVCommander is a Sourceforge project, that provides a nice WebDAV frontend which can also be used as a Java Applet inside a web browser.
This following blog post shows how DAVCommander can be easily integrated into DavDrive (and DavDrive Lite).

The idea is to put the files needed by DAVCommander (HTML and JAR file) into a folder served by DavDrive and call the HTMLfrom a browser. The HTML contains a JavaScript that builds the <applet> tag with the appropriate WebDAV URL, so that the configuration is done automatically. For all this to work Java has to be installed on your PC and Applets have to work.

For those interested, here is the HTML page:

<script type="text/javascript">

davURL = window.location.protocol + "//"  + window.location.host;

document.write('<body style="background: gray;"><div style="border: 1px solid black;">');
document.write('<applet archive="DAVCommander.jar" code="ch.oxinia.webdav.davcommander.AppletMain.class" width="100%" height="98%">');
document.write('<param name="uri" value="' + davURL + '">');
document.write('<param name="staticUri" value="true">');
document.write('<param name="acl" value="false">');
document.write('<param name="versionControl" value="false">');
document.write('<param name="locking" value="false">');
document.write('<param name="davproperties" value="false">');
document.write('<param name="showTrees" value="false">');
document.write('<param name="multipleSelection" value="true">');
document.write('<param name="dragDrop" value="true">');
document.write('<param name="renameWithDoubleclick" value="false">');
document.write('<param name="lockUiWhileBusy" value="false">');
document.write('<param name="keepAlivePeriod" value="0">');
document.write('<param name="keepAliveUri" value="">');
document.write('</applet>');
document.write('</div></body>');
</script>

Don't worry, installation is very simple and all you need is a simple ZIP file which is provided at the end of the post that has to be extracted to a directory served by DavDrive.

In my example, I'll extract the ZIP file to my /sdcard on my Android device which is also the root folder of my DavDrive setup. After this is done direct the browser to the URL displayed by the DavDrive app, enter user/password and browse to the DAVCommander Folder.

 
Directory Listing



After selecting the file DAVCommander.html the Applet should be started and after providing user/password (could be more than once) DAVCommander should appear.


DAVCommander


That's it, now you can mange files and folders directly from within your browser.

Downloads:
DAVCommander.zip

No comments:

Post a Comment