Live data from Hacker News

The Native File System API allows web apps to save directly to files

web.dev

101–110 of 155 posts

Re: The Native File System API allows web apps to save directly to files

#101
post #66

Earlier quoted context omitted.

In plenty of countries iPhone has 0% market share, the local companies don't care about iPhone support.

Name one.

iOS global market share is around 22%, plenty of countries to chose from.

https://leftronic.com/android-vs-ios-market-share/

Here a device atlas (2019) with plenty of countries for you to play with,

https://deviceatlas.com/sites/deviceatlas.com/files/images/m...

Re: The Native File System API allows web apps to save directly to files

#102

Earlier quoted context omitted.

Exactly, the focus must be on trying to mitigate it, not make it more easier.

Should they block online email providers too because someone might send a phishing email?

Yeah so there are few dozens of ways people are getting spammed, why not lets add more ways. Here's an Idea let me write a blog post on how to make windows look cooler and ask my 12YO user to point me to their windows directory and let me use my API to inject my DLLs, none of the defenders of this API are not estimating the level of social engineering, and how dumb users can be, and also the reason why Android failed in terms of privacy.

Re: The Native File System API allows web apps to save directly to files

#105

Earlier quoted context omitted.

Running a browser from the downloads directory is unlikely to work correctly on macOS.

It’s funny you say this, because I did exactly this yesterday. I downloaded chromium and forgot I had not yet dragged it to my applications folder and I was running it for a few hours out of my downloads folder.

Google Chrome ships in a DMG, doesn’t it? This means that if it is running out if your downloads folder, it’s not subject to the things that would mess it up because you dragged it there.

Re: The Native File System API allows web apps to save directly to files

#106
post #94

I’d feel safer if all applications could only access files tagged with an unique ID for the application. But then applications will start asking access for all of $HOME and we’re back to square one

Create separate user for every application and run it under that user.

Re: The Native File System API allows web apps to save directly to files

#107
We've been trialling the Native File System API in our PWA Construct 3 (a browser based game editor - https://www.construct.net).

I think it's absolutely fantastic, and users love it too - it gives them exactly what they expect from IDE-style software in the browser, such as "Save as" to any location on disk, and the ability to use folder-based projects (that are spread across multiple files).

The security concerns are obviously important but I'm pretty confident it's largely mitigated through the permissions model (which is similar to one Windows Store apps use). Also as noted elsewhere, existing web features already allowed reading files and even entire directories; the writing files part is new, and you cannot choose system directories, or ask for too much (e.g. root of the user directory).

So in short I think this is great news for the web and a big step towards allowing web apps to reach parity with desktop/native apps, while managing to do it in a reasonably safe way.

Re: The Native File System API allows web apps to save directly to files

#108

Earlier quoted context omitted.

It appears I could use this to ask a victim to "select your downloads folder" to save files to and then steal or overwrite any file in it.

If the permissions system in place is clear and potent enough, I don't see the problem. You can also ask people to simply download and install an app that can do whatever it wants. It's 2020 and we still can't build web apps that can read and write to local files. Browsers are no longer useful just for reading text.

The permissions system seems to be granular with respect to whatever was selected - if you select a directory you have full access to everything in it. Theoretically the permission system requires explicit approval, but if you see the security system with the user I think it presents more risk to users than before.

Previously if you wanted filesystem control you had to trick a user into downloading something. With this API, it seems like it would be easier to con unsuspecting users into granting permissions they aren't aware they're granting.

Re: The Native File System API allows web apps to save directly to files

#109
post #84
post #42

Earlier quoted context omitted.

>So in essence, all this new API is mostly buying you is offline mode. There's been, for a long time, local storage APIs. This is filesystem access, which is very different.

I think adding a virtual file system to the local storage API's might be fine. One which cannot be mounted easily by non-technical users but has a viewer which allows dragging files into and out of it.

I vaguely recall something like that, a virtual file system using browser local storage. A search yields:

> BrowserFS is an in-browser file system that emulates the Node JS file system API and supports storing and retrieving files from various backends.

https://github.com/jvilk/BrowserFS

It supports storage backends such as: in memory, LocalStorage, IndexDB, HTTP, or the FileSystem API.

Re: The Native File System API allows web apps to save directly to files

#110

Earlier quoted context omitted.

It’s funny you say this, because I did exactly this yesterday. I downloaded chromium and forgot I had not yet dragged it to my applications folder and I was running it for a few hours out of my downloads folder.

Google Chrome ships in a DMG, doesn’t it? This means that if it is running out if your downloads folder, it’s not subject to the things that would mess it up because you dragged it there.

I think Chromium does get shipped as a normal executable, it's only Chrome which gets released as DMG.
Post reply on HN