Jump to content
Larry Ullman's Book Forums

Use Javascript To Locate And Open Files On Local Computer

Recommended Posts

I have used a couple of your books extensively to develop a couple websites. I don't recall seeing the following topic covered.


On my current project, I need my users to be able to locate and open a spreadsheet, word, or pdf file that is located (via an in-common cloud server) on their individual, local desktop computer. I don't want the file to open within the website, but instead the spreadsheet file, for example, should open via the software on the desktop, thus allowing the user to be outside of the website and edit or view the file, and then resave it on the desktop (via the cloud server) as appropriate.


My users all have identical acces to the list of files that are located on the cloud server. All users have access to the same files. The only thing that is centralized on the website is the file reference (that is the same for each user), and the ability to cause that file to be opened.


Is there a way to do this via javascript?



Link to comment
Share on other sites

Your question is a bit unclear, but assuming my understanding is correct, what you want to do is not possible, regardless of the programming language you use.


Probably the closest you can get is to force the browser to download the file, and then let the user open that file directly using either the default suggested program or a program of their choosing.


I think it's important to realize that the web as a whole intentionally does not give websites access to a user's local file system and the programs installed there, as that could lead to huge security concerns.

Link to comment
Share on other sites


  • Create New...