View Full Version : explorin local filesystem

17 Aug 2009, 8:42 AM

I need to explore the local filesystem with extjs.
For example i would like to have the possibility to explore my local filesystem with a extjs tree within a web page.
Is that possible?
If it is how can I do that?


17 Aug 2009, 8:51 AM
Have you looked at the examples?

Also, is this without a web server?

17 Aug 2009, 9:06 AM
I dont't need a web server.

I just need an html page with the extjs code that just displays for example in a tree
the content of the hard disk of the pc where the html page is diplayed.

I have seen the example on trees with extjs but I did not find an example with a tree to explore the local hard disk.

If I was wrong and there is an example to solve my problem cuold anyone link this example?

17 Aug 2009, 9:09 AM
isn't what file://c:/ is for?

that said, you would need something to serve up data (JSON, XML, etc)

17 Aug 2009, 9:11 AM
One option is to read the data from the return of file://c:/ and parse it , but that would be too messy.

btw: http://www.ghacks.net/2008/07/14/firefly-firefox-file-browser/

17 Aug 2009, 9:12 AM
question for you: How familiar are you with web development?

17 Aug 2009, 9:28 AM

I am new to extjs and I'm not an expert web developer.
What I'am doing is a web application wich permits the user to upload some images into a web gallery.

Im using php but the server where my application runs does not support a library to decompress zip files.

So what I want to do is:

The user opens the page with the extjs tree.
The user choose the directory that contains the images
The user press a "upload" button and an ajax script calls the page upload.php for every images in the directory.
Upload.php moves the single image to the correct position on the web server.

Of course I dont now wich browser the user is using...

What do you mean with file://c:/??

Shuold I put file://c:/ as the root option of a tree like this?:

var tree = new Ext.tree.TreePanel({
title: 'My Task List',
height: 300,
width: 400,
containerScroll: true,
rootVisible: false,
frame: true,
root: {
nodeType: 'file://c:/'

Thanks for your help

17 Aug 2009, 10:23 AM
Absolutely not.

You need to use a file upload field or a flash solution.

17 Aug 2009, 10:24 AM
placing file:// in your browser's address bar is a way to use the browser to browse the local file system.

Google man :)

17 Aug 2009, 12:35 PM
In my humble opinion you cannot use Javascript to explore a user's hard drive or any resource of the local system outside the browser's context.

This would create some serious security issues if browsers would allow this to happen...
Imagine websites to read your local files without you knowing about it....

Your only opion is, like jgarcia said, the upload field, a flash uploader or ActiveX.
The latter i would not recommend...

Just my 2 cents.