https://developer.mozilla.org/en-US/docs/Web/API/Window/show...
window.showDirectoryPicker opens up a whole new world
11–20 of 122 posts
Re: window.showDirectoryPicker opens up a whole new world
#12I mean, what could go wrong?
It's not like an user is tricked into uploading a file from a folder (let's say, the main "Documents" folder) and some malicious website steals all the files over there.
Re: window.showDirectoryPicker opens up a whole new world
#13Re: window.showDirectoryPicker opens up a whole new world
#14Re: window.showDirectoryPicker opens up a whole new world
#15First time I've heard about this. I'll have to look into the security model around it. I'm curious what safeguards are in place to prevent click jacking. I know showing a file picker """should""" be enough of a warning to users to be careful, but it's not hard to imagine a world where a couple of fish accidentally bite the bait of an allow-button, or because they followed instructions they incorrectly trusted.
* System and root directories cannot be selected. * Can only being activated after user action. * Requires https. * Double-confirmation for write access.
No API like this could ever be bulletproof, but it's a start I guess.
Very cool API though, and it really does open up a whole new world of possibilities.
Re: window.showDirectoryPicker opens up a whole new world
#16Currently using this in socket2.me Not truly supported across all mobile browser currently, but it's certainly better than just one year ago.
* Global 75.2%
Mainly missing Safari and Firefox
Re: window.showDirectoryPicker opens up a whole new world
#17Re: window.showDirectoryPicker opens up a whole new world
#18Unfortunately currently only supported by Chrome/Chromium: https://developer.mozilla.org/en-US/docs/Web/API/Window/show...
Re: window.showDirectoryPicker opens up a whole new world
#19Some of the permissions problems related to window.showDirectoryPicker have been frustrating. I'm developing a client-side Python web framework, and during development I need to mount the library locally; I hand off the directory to Pyodide using this API. But that doesn't work in VSCode's internal browser, apparently because the API just simply isn't able to be approved.
sounds like vscode issue more than anything else
Re: window.showDirectoryPicker opens up a whole new world
#20But webkitdirectory="true" could already do that, no?