Results 1 to 5 of 5

Thread: Browser Links to Access Local Files

  1. #1
    Sencha User
    Join Date
    Feb 2008
    Location
    USA
    Posts
    162

    Default Browser Links to Access Local Files

    I am attempting to create an interface that allows files to be attached to entries in the database.

    The trick is, the files are "local" in terms of web browsers. The actual location resides on a mapped network drive common to all computers at my home. So I can access these files directly by browsing to the network drive and opening them, but I want to be able to create links to the files in the web interface to open the file more quickly.

    file:// seems to be something that would work, but it didn't. (unless I'm doing it wrong) And I think that's just a hack anyway.

    I might have to resort to giving access to these files to my web server, and write a PHP script that will pipe the files through the web server, but I don't want to, and it seems like there's an easier way to do it.

    Has anyone else had to deal with anything similar to this?

  2. #2
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966

    Default

    Quote Originally Posted by carl23934 View Post
    I am attempting to create an interface that allows files to be attached to entries in the database.

    The trick is, the files are "local" in terms of web browsers. The actual location resides on a mapped network drive common to all computers at my home. So I can access these files directly by browsing to the network drive and opening them, but I want to be able to create links to the files in the web interface to open the file more quickly.

    file:// seems to be something that would work, but it didn't. (unless I'm doing it wrong) And I think that's just a hack anyway.

    I might have to resort to giving access to these files to my web server, and write a PHP script that will pipe the files through the web server, but I don't want to, and it seems like there's an easier way to do it.

    Has anyone else had to deal with anything similar to this?
    Browser security is pretty tight, and getting tighter. Local file:// access is usually permitted if you run the browser App from the local file system, and not thru an HTTP server.

    You might also have a look at portable runtimes (like Adobe Air) for that purpose.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  3. #3

    Default

    It seems like file:// URLs should work fine if you are just using them as links. Obviously you will run into issues if trying to load them via ajax though.

  4. #4
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,966

    Default

    Quote Originally Posted by devnull View Post
    It seems like file:// URLs should work fine if you are just using them as links. Obviously you will run into issues if trying to load them via ajax though.
    Nah, ext-basex solves the Ajax request problem.

    But, FF3 now restricts file-system access to the current directory and below only (unless the user does about:config changes). Yuk.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


  5. #5
    Sencha User
    Join Date
    Feb 2008
    Location
    USA
    Posts
    162

    Default

    Quote Originally Posted by hendricd View Post
    Nah, ext-basex solves the Ajax request problem.

    But, FF3 now restricts file-system access to the current directory and below only (unless the user does about:config changes). Yuk.
    Yeah, this is lame.

    It seems to work well in IE 7, but FF3 blocks the request. Luckily I will be mainly running this app on IE so this isn't a big concern.

    I might have to create that PHP script for the sake of file validation. When a file is "attached" it is not actually uploaded, but the file path is associated, so it would be good to validate file existence when this association is made.

Posting Permissions

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