Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Accessing local files?

    Ok, being a web develper i know that this isnt generally acceptable, and rightly so for many reasons.

    But at the moment i am toying with an idea and i basically i want to have a page where when loaded by a client, it (by either asking and getting permission, because the client will WANT to give permission) look for a specific directory on the users computer and read a file within, no writing, no modifying, just read a file.

    Ive read recently that HTML5 gives local file storage/access but from what i have read this allocates you space on the HD to store and read files you have put there, so not access to the client directories.

    Like i said, i can fully see the reason for not, but the client will want to give permission, so even if there is a promt that is fine.

    Thanks
    Andy

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    How often does the file need to be read?
    How often does the file contents change?
    And what does the file contain that can be read?

    I'm thinking that there would be an .exe script running on
    the user's PC that periodically uploads (FTP) an XML file or
    something containing the data to a website ... to be
    read online from the webhost server, not the user's PC.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    629
    Thanks
    1
    Thanked 20 Times in 20 Posts
    How about:
    Code:
    <iframe src="directoryName/FileName">
      Your browser doesn't support IFrames.
    </iframe>
    You might also care about things like:
    Code:
    frameborder="1"
    width="30%"
    height="300"

  • #4
    Regular Coder patryk's Avatar
    Join Date
    Oct 2012
    Location
    /dev/couch
    Posts
    398
    Thanks
    2
    Thanked 64 Times in 64 Posts
    as far as I know the closest thing to what you want to accomplish would be automated AJAX upload, but user will still have to sellect the file.
    that's security measure in all browsers i know.

    as far as i know your only option would be to have dedicated software on client's side. For example you can tell your user to download some simple VBasic script to uplaoda files to your server.


  •  

    Posting Permissions

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