Results 1 to 10 of 10

Thread: explorin local filesystem

  1. #1

    Default explorin local filesystem

    Hi

    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?

    Thanks

  2. #2
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    Have you looked at the examples?


    Also, is this without a web server?

  3. #3

    Default

    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?

  4. #4
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    isn't what file://c:/ is for?

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

  5. #5
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    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/fir...-file-browser/

  6. #6
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    question for you: How familiar are you with web development?

  7. #7

    Default

    Well

    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?:
    PHP Code:
    var tree = new Ext.tree.TreePanel({
            
    renderTo:'tree-div',
            
    title'My Task List',
            
    height300,
            
    width400,
            
    useArrows:true,
            
    autoScroll:true,
            
    animate:true,
            
    enableDD:true,
            
    containerScrolltrue,
            
    rootVisiblefalse,
            
    frametrue,
            
    root: {
                
    nodeType'file://c:/'
            
    }, 
    Thanks for your help

  8. #8
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    Absolutely not.

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

  9. #9
    Sencha User jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364

    Default

    placing file:// in your browser's address bar is a way to use the browser to browse the local file system.

    Google man

  10. #10
    Sencha User
    Join Date
    Jul 2009
    Posts
    32

    Default

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •