frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

window.showDirectoryPicker opens up a whole new world

https://steveharrison.dev/showdirectorypicker-opens-up-a-whole-new-world/
48•steveharrison•1h ago

Comments

steveharrison•1h ago
I'm really excited about window.showDirectoryPicker and the local-first web apps it will enable. There's lots of talk about local-first sync engines, but the best sync engine is one you don't even manage, like the user's file system / cloud storage service!
acbart•51m ago
Some 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.
Yiin•44m ago
sounds like vscode issue more than anything else
tantalor•37m ago
Usability issues? In vscode? No...
yread•49m ago
But webkitdirectory="true" could already do that, no?
hyperhello•37m ago
What’s that?
justusthane•15m ago
No, they're very different. Using webkitdirectory="true" on an <input> element just allows you to select a directory to e.g. upload it to the server. It's a one-time operation.

This API returns a handle to the selected directory, giving the webpage ongoing read/write access to the directory.

You couldn't use the former to e.g. create a local-first notes app that stores its files on disk.

explodes•44m ago
First 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.
explodes•39m ago
Looks like these safeguards are in place:

* 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.

ptx•22m ago
Those are some pretty flimsy safeguards. I don't keep my secrets in system directories and using HTTPS doesn't mean the site isn't malicious.
Ajedi32•16m ago
> I don't keep my secrets in system directories

Root of the home directory is also excluded.

But obviously yeah, nothing's going to prevent you from giving a website access to your .ssh directory if you explicitly select it.

Personally I don't have a problem with that. The ability to upload files has been a thing on the web for forever and I don't think there's ever been anything that stopped users from uploading their private key. Possibly some users have gotten phished that way, but at a certain point you have to allow people to take responsibility for their own actions.

mschuster91
bigrocketapps•43m ago
Currently using this in socket2.me

Not truly supported across all mobile browser currently, but it's certainly better than just one year ago.

tantalor•38m ago
https://caniuse.com/mdn-api_window_showdirectorypicker

* Global 75.2%

Mainly missing Safari and Firefox

asdfsa32•30m ago
This new IE6 called Chrome, I hate it.
chrismorgan•20m ago
You say “mainly missing Safari and Firefox”, but the better way to look at it is “only Chromium”. There is only one implementation, and the other two major implementers have explicitly rejected it. And we don’t standardise things without at least two implementations.
jaen•43m ago
Unfortunately currently only supported by Chrome/Chromium:

https://developer.mozilla.org/en-US/docs/Web/API/Window/show...

AlienRobot•37m ago
Chromium has around the same market share as Windows, so at this point I feel people are targeting it as a web application development platform just as people target Windows.
inigyou•11m ago
(intentionally, because it's a massive security risk and only Google doesn't care about endpoint security)
znpy•42m ago
> Chrome introduced a new API, window.showDirectoryPicker() that allows the user to grant access to a directory on their computer and allow a website to read/write everything inside.

I 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.

bigrocketapps•34m ago
If you tried this out in Linux, for example, the system would block you from selecting folders that contain files that are flagged as dangerous or "system files". I'm assuming this was implemented across all OSes.
blharr•16m ago
That does not sound at all reassuring, that the only safeguard is the system blocking access and that the API has no safeguard.

Its also easily possible to have sensitive files misplaced, especially for a general non-technical user that would be the one falling for a browser hijacking attack

GL26•41m ago
Using an example that is similar to what is shown in the article's videos, this could be awesome for a "blender in the cloud" for render farms. Imagine just having your blender file, read and written to, with a simple web interface
AlienRobot•39m ago
I wish we had this in the operating system. It would solve an immense number of risks such as data deletion from bugs and even ransomware.
asdfsa32•19m ago
MacOS has this and what happens is that you get into the habit of just clicking through it. It won't help with ransomware, only backups would.
jeroenhd•13m ago
Which operating system do you mean? Flatpak has this already, Android enforces this kind of API for shared files, Windows UWP has pretty much the exact same API (https://learn.microsoft.com/en-us/uwp/api/windows.storage.pi...).

App developers will often choose not to sandbox their applications because it's a lot easier (and sometimes faster) do to all file management yourself, but the APIs are there and ready to be used.

cicko•37m ago
Too many prompts and not an official API. Back in the day, IE also had tons of "great" and novel ideas, including COM+ something something.
libria•9m ago
They also popularized XMLHttpRequest. Sometimes a flexible idea can trend to the greater ecosystem.
buckle8017•35m ago
A whole new world of phishing.
streptomycin•28m ago
This isn't new, the API has been around for several years. Unfortunately Mozilla and Apple say they are never going to implement it because of security concerns https://github.com/mozilla/standards-positions/issues/154

It is a great API though, I wish the other browser vendors liked it! Because currently us PWA developers are really limited when trying to make apps that work with local data, at least in non-Chrome browsers.

sharperguy•8m ago
You could implement it this way:

- the first time you select a directory it must be empty

- you can drag files in there afterwards

- the directory gets whitelisted for future use

Probably has bad usability, but would be more secure.

NooneAtAll3•6m ago
fortunately*
rvz•27m ago
Phishers and exploit developers are celebrating and jumping for joy over yet another way to deploy their payload to their victims.

What are the many ways could this possibly go wrong?

Anduia•13m ago
"Choose your browser cache folder to improve performance"
ptx•26m ago
So websites can now nag users to allow access to the root of their local disk and then read all their files and settings, all their SSH keys and other passwords?

From what I gather from the docs [1], this API gives you a FileSystemDirectoryHandle object, and then you just call getDirectoryHandle() on that to recursively read the the entire filesystem. The spec [2] has some vague suggestions about blacklisting certain particularly sensitive files, which doesn't seem reassuring.

[1] https://developer.chrome.com/docs/capabilities/web-apis/file...

[2] https://wicg.github.io/file-system-access/#privacy-wide-acce...

Ajedi32•20m ago
Root directory would be on that blacklist for sure.

Those "vague suggestions" actually seems to include some pretty specific examples.

> A user’s entire "home" directory. Individual files and directories inside the home directory should still be allowed, but user agents should not generally let users give blanket access to the entire directory.

jaffathecake•17m ago
> So websites can now nag users to allow access to the root of their local disk

No, Chrome doesn't allow this.

Here's a simple demo: https://output.jsbin.com/kekekac/quiet - note that you can't select root, Downloads etc.

sarreph•11m ago
I think something that is a mix between localStorage or IndexedDB and access to the user's filesystem would be better.

I agree with the comments about how much of a security risk this poses. But, isn't that the case with any binary or executable files and apps we download from the internet anyway?

It would be cool if you could have a specially-demarcated directory (e.g. even inside the application like `~/Applications/Chrome/<website>/local_files`) which you can just open super easily with a button from Chrome, and just copy files over into that directory as needed. Would provide the benefits of a more secure enclave with the flexibility of being on the filesystem.

steve1977•11m ago
I'm not sure if this is meant to be ironic?

"You can also create folders within the app and move photos into them, and it all happens on your filesystem."

Why, yes. But you can also do that with Finder.

And if you want to work with local data, why use the often inferior web-based widgets and toolkits instead of native ones?

This seems to be the worst of both worlds so to speak.

•
19m ago
> System and root directories cannot be selected.

That desperately needs something like the Public Suffix List [1] - a community-managed list where authors of software can blacklist directories containing sensitive files or such files directly for all browsers implementing this feature.

If I were to design such a list, it would include ~/.ssh, ~/.aws, ~/.config, ~/Library, ~/.{ba,z}sh{rc,_profile,_history}, ~/.m2, ~/.npm, ~/.npmrc, ~/.profile at the very least. Because users will get phished.

[1] https://en.wikipedia.org/wiki/Public_Suffix_List

inigyou•11m ago
This is still a security nightmare! You won't get every folder, or even enough folders.
cicko•32m ago
This is something you should explain to the Firefox critics.
asdfsa32•27m ago
Chrome and friends (Edge, Opera) are basically the new IE6 and only people who are new or forgetful will disagree. I hate Mozilla for missing up so bad with their stewardship of Firefox time and again, but alas, it is the only reasonable option on the table.

And while I do hate Mozilla, Google is to be disliked even more.

Krugman, Fable 5, and Europe in Decline?

https://philippdubach.com/posts/krugman-fable5-europe-decline/
1•7777777phil•1m ago•0 comments

Show HN: Revenant – automatic LLM powered reverse engineering

1•sylwester•2m ago•0 comments

The 11-Dimensional Vortex: Why Physics Needs a Geometric Reboot

https://medium.com/@aleksy.rybicki/the-11-dimensional-vortex-why-physics-needs-a-geometric-reboot...
1•aleksy_rybicki•2m ago•0 comments

My 1992 view of the problems of computer programming in 1992

https://blog.plover.com/2026/06/18/#fortran-i
1•surprisetalk•2m ago•0 comments

Ask HN: How close are we to local LLMs being useful? What's the impact?

1•AbstractH24•4m ago•1 comments

Lessons from the VMwars – nothing virtual about the Broadcom vs. Tesco slugfest

https://www.theregister.com/virtualization/2026/06/22/lessons-from-the-vmwars-nothing-virtual-abo...
1•SanjayMehta•4m ago•0 comments

JetBrains Air: Agentic Development Environment

https://air.dev/?source=google&medium=cpc&campaign=amer_en_us_air_wave1_mar_google_search&term=mu...
1•jtanderson•4m ago•0 comments

A New Interpretation of the Rise of Intelligence: Falling CO2 Levels Was Key

https://senecaeffect.substack.com/p/a-new-interpretation-of-the-rise
1•Qem•5m ago•1 comments

Seekstone – a filesystem-direct Obsidian MCP server for Claude

https://seekstone.dev/
1•shaqmughal•5m ago•0 comments

Insider Threat Detection Platform · Streamlit

https://enterprise-insider-threat-detection-platform-mvmfzoaxdycuzkvz7.streamlit.app
1•muhammadibrar66•5m ago•0 comments

I made a free MCP server so your Claude can read Claude/Anthropic news and RAG

https://claudenews.online
1•BaguettePwnM•5m ago•0 comments

Go-Harness

https://github.com/Protocol-Lattice/go-harness
1•raezil•9m ago•1 comments

Notification of Data Security Incident – Texas Parks and Wildlife

https://tpwd.texas.gov/about/notification-of-data-security-incident
1•geox•11m ago•0 comments

Show HN: Monolisa v3 – a typeface for developers and creatives

https://www.monolisa.dev/
2•bebraw•12m ago•0 comments

MiniPixelFont Generator

https://xem.github.io/miniPixelFont/js13k.html
2•javatuts•14m ago•0 comments

Tabulator – interactive JavaScript tables and data grids

https://github.com/tabulator-tables/tabulator
1•javatuts•14m ago•0 comments

Show HN: Spookling – An iPhone AI Agent for WhatsApp and Calendar

1•salman10•15m ago•0 comments

Putin Has a New Tool to Monitor Russians (2025)

https://www.theatlantic.com/international/archive/2025/10/russia-super-app-max/684524/
1•dotcoma•16m ago•0 comments

The World Now Has More Bot Traffic Than Human Traffic

https://newsletter.signoz.io/p/the-world-now-has-more-bot-traffic
2•birdculture•16m ago•0 comments

Democracy Needs Friction to Function

https://www.noemamag.com/democracy-needs-friction-to-function/
3•hamburgererror•17m ago•0 comments

Genuinely, my all-time favourite image: Mamenchisaurus hochuanensis

https://svpow.com/2026/06/04/genuinely-my-all-time-favourite-image-mamenchisaurus-hochuanensis/
1•surprisetalk•17m ago•0 comments

We should vaccinate wild animals

https://worksinprogress.co/issue/why-we-should-vaccinate-wild-animals/
2•surprisetalk•17m ago•0 comments

Nvidia Halos

https://www.nvidia.com/en-us/ai-trust-center/halos/autonomous-vehicles/
11•ilreb•20m ago•0 comments

All time best of Split Depth GIFs

https://old.reddit.com/r/SplitDepthGIFS/top/
1•mxfh•21m ago•0 comments

Show HN: A voxel editor for decorating a home for a Tamagotchi-like creature

https://kamio.ai/studio
2•eric_khun•21m ago•0 comments

Two Singaporean brothers turns unsolvable math into post-quantum encryption

https://startupfortune.com/two-singaporean-brothers-turned-unsolvable-math-into-southeast-asias-f...
1•insanetech•24m ago•0 comments

Show HN: Ziex, a Zig web framework reaching its first release

2•nurulhudaapon•24m ago•0 comments

Moebius: 0.2B image inpainting model with 10B-level performance

https://hustvl.github.io/Moebius/
2•DSemba•24m ago•0 comments

Trump unveiled Qatar's gifted Air Force One this week

https://respublica.media/en/trump-unveiled-qatars-gifted-air-force-one-this-week/
3•Veldoran•24m ago•0 comments

Tesla driver says it was on Autopilot before fatal Texas home crash

https://electrek.co/2026/06/20/tesla-autopilot-katy-texas-home-crash-woman-killed/
3•croes•25m ago•0 comments