If I open a website, how I can view my own computer's contents on that site? I'm thinking Javascript, but how would I do this? This would be for like a file manager.
Example: Opening example.com and have a navigator for my computer's files.
If I open a website, how I can view my own computer's contents on that site? I'm thinking Javascript, but how would I do this? This would be for like a file manager.
Example: Opening example.com and have a navigator for my computer's files.
For security reasons, you can't access a computer's file system from the browser via Javascript.
However, to answer your question literally, you could do this (in your console):
var input = document.createElement('input');
input.type = 'file';
document.body.appendChild(input);
Scroll to the bottom of the page and you'll see a file input field.
This will allow you to browse your computer's files from the webpage.
Are you looking to access (potentially) ANY site's client/visitor's file system?
This is NOT possible, otherwise it would be a HUGE security breach.
If you could do it, anybody else could do it too. Imagine you yourself visiting some obscure site somewhere (it may be in pop-up even) and then some months later discovering that all your personal information that you had on your computer is available for sale.
This is what I understand
You run example.com and want to show your filesystem to the public
You run example.com and want to show visitors filesystem to himself