Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Drive Access through browser  (Read 5369 times)

0 Members and 1 Guest are viewing this topic.

Punkaj

    Topic Starter


    Starter
    • Experience: Experienced
    • OS: Windows 8
    Drive Access through browser
    « on: July 15, 2016, 11:58:08 AM »
    i want to access my drive from a browser,
    i have used "file://DriveName:" in the anchor tag and i got the result,
    but i want that page to be in my own design, not the default "Index of file//DriveName" page.
    So if there is any way you guys could figure it out and help me, i would be obliged
    in the image is the output i get after clicking the link

    [attachment deleted by admin to conserve space]

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: Drive Access through browser
    « Reply #1 on: July 15, 2016, 12:27:46 PM »
    That is the normal way for the browser to s how a local directory.

    Rather than making  own index page for every directory, you might consider using an alternative to the Windows Explorer.
    Here is a short list:
    http://www.howtogeek.com/205770/the-best-alternative-file-managers-for-windows-mac-and-linux/


    camerongray



      Expert
    • Thanked: 306
      • Yes
      • Cameron Gray - The Random Rambings of a Computer Geek
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Mac OS
    Re: Drive Access through browser
    « Reply #2 on: July 15, 2016, 12:29:47 PM »
    What is your ultimate goal with the files?  Accessing the filesystem through a browser is very limited for obvious security reasons.  The only way you can view a list of files on the system is through an <input type="file"> input which will display a "Choose file" button that will open up a file browser dialog.  There's no way to just get a list of files from a directory and put it onto a web page - This would be far too big a security risk!

    Punkaj

      Topic Starter


      Starter
      • Experience: Experienced
      • OS: Windows 8
      Re: Drive Access through browser
      « Reply #3 on: July 16, 2016, 01:25:40 AM »
      i'm not saying dat i want to access it online (security risks)
      i just want to create an HTML page and display the list of files that i have on my pc(in my own design).
      i only want to access my files through my browser.
      its only on my pc and after opening the .html page i want to check out the stuff that i got.
      i'm sure there shouldnt be any security risk in this case when i'm not online

      camerongray



        Expert
      • Thanked: 306
        • Yes
        • Cameron Gray - The Random Rambings of a Computer Geek
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Mac OS
      Re: Drive Access through browser
      « Reply #4 on: July 16, 2016, 06:28:19 AM »
      There aren't security risks if you just have it locally on your PC as you said but browsers don't care, they still don't contain the functionality to browse the filesystem.  The only way you could achieve this is to have some sort of backend server running a script such as PHP or Python that reads the filesystem then generates the HTML code displayed by the browser.  This sounds like a project that is better suited to a desktop application than trying to make a web page.

      DaveLembke



        Sage
      • Thanked: 662
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 10
      Re: Drive Access through browser
      « Reply #5 on: July 16, 2016, 08:17:25 AM »
      Quote
      The only way you could achieve this is to have some sort of backend server running a script such as PHP or Python that reads the filesystem then generates the HTML code displayed by the browser.  This sounds like a project that is better suited to a desktop application than trying to make a web page.

      Years ago I tried to integrate HTML mainly as a way to make quick nice looking user interfaces to run programs and found that due to how heavily security plugged to avoid exploits the browsers are, it makes more sense to just code it up as a program that runs outside of the browser since its local use only. I agree that it could be done up as a web server running PHP or Python to gather the info requested in the trusted zone and then the PHP or Python returns the info to the user through Dynamic HTML, but thats a lot of work for what would run locally.

      Does this have to be done through browser... such as is this a school project?

      For local custom explorer like interface if you want to dive into C# you can achieve this without having to have a web server hosting locally for the service: http://www.c-sharpcorner.com/article/step-by-step-guide-for-creating-your-own-windows-explorer/

      Punkaj

        Topic Starter


        Starter
        • Experience: Experienced
        • OS: Windows 8
        Re: Drive Access through browser
        « Reply #6 on: July 17, 2016, 12:38:04 PM »
        it not a school project, its just my leisure.........thought of trying out something. so ultimately can i achieve it?
        i hav done programs in PHP, linking PHP with MYSQL, a bit html embeded in PHP also but i'm not sure if i'm qualified to try this out.
        i guess its quite some work to put in this project
        but if you could be more elaborative, i could possibly achieve it.
        Thank You Guys.
        Hope to hear soon