News for hackers. Stuff that matters.
Re:Firefox 111.0 enabled Origin private file system access by AshleysBrain on Wednesday March 15, 2023 @06:18AM (#35166048)
I agree - the File System Access API with full integration with local files and folders is essential for desktop web apps. Ours[1] supports File System Access for saving and opening projects in Chromium-based browsers, and our stats show a full 65% of users save that way. So it's also what real people actually want to use in browsers.

[1] https://www.construct.net

Re:Firefox 111.0 enabled Origin private file system access by tgv on Wednesday March 15, 2023 @06:46AM (#35166224)
I'm basically against the browser getting too much access, so what is missing in Firefox 111 for your use case? Is it just less convenient for end-users?
Re:Firefox 111.0 enabled Origin private file system access by AshleysBrain on Wednesday March 15, 2023 @08:34AM (#35167287)
The key is the file and folder picker methods (showOpenFilePicker() etc), allowing the web app to interact with existing files and folders on the device. OPFS does not allow that, as it's internal storage in the browser, like IndexedDB.
Re:Firefox 111.0 enabled Origin private file system access by cxr on Wednesday March 15, 2023 @09:28AM (#35168022)
Browsers have been able to get access to files on disk for longer now than many frontend developers have even had careers—drag and drop was one of the first HTML5 APIs. Same with client-side processing for `<input type="file">` elements. (Directory access through the `webkitdirectory` attribute is another story, but it is supported by all major browsers nowadays—even if it's terribly named and the scary warnings about how it will "probably" go away on MDN haven't been updated.)

As for writing, you don't get unlimited unchecked writes the way that Chrome's proposed Filesystem Access API grants you, but you can trigger "checked" writes (that show a file save dialog) using `<a/>` elements with the `download` attribute. This is arguably a better user experience, because it keeps the user in the loop, allowing them to veto (or rename) the written file at a fine-grained level—which will be difficult or impossible to do if the Chrome team's proposed API because standard.

Overall, the File System Access proposal is a bad one that favors authors over users, and I hope it doesn't become either a de facto or a de jure fixture of the Web platform soon. Here's to hoping for a future post to the Chrome Developers blog announcing that support for yet another experimental API of theirs will be sunset in some future release.

Re:Firefox 111.0 enabled Origin private file system access by nine_k on Wednesday March 15, 2023 @10:19AM (#35168686)
This is not access to the filesystem.

This is access to some controlled contents that happen to come from the filesystem, with interaction explicitly initiated by the user every time. It gives the browser no access to the structure of the filesystem, no way to navigate it, and crucially no way to transparently read or write anything.

This is good isolation, I'd prefer it to be this way. OFS also gives equally good isolation, I'm fine with that.

Sharing between OFS and the rest of the user's file system should be possible, but only explicitly, a la iOS, Android, and the file upload / download dialog.

Re:Firefox 111.0 enabled Origin private file system access by cxr on Wednesday March 15, 2023 @10:35AM (#35168904)
* * *
Re:Firefox 111.0 enabled Origin private file system access by nine_k on Wednesday March 15, 2023 @11:10AM (#35169515)
Please take another look at the comment I was replying to. It was about <input type="file"> and <a> with disposition attribute, which are not filesystem access.

While Google's new API definitely is.

Re:Firefox 111.0 enabled Origin private file system access by cxr on Wednesday March 15, 2023 @11:35AM (#35169907)
* * *
Re:Firefox 111.0 enabled Origin private file system access by worksonmine on Wednesday March 15, 2023 @09:40AM (#35168169)
What's wrong with <input type="file" /> and the $HOME/Downloads folder?

Why is arbitrary access to a whole folder needed? Cool, yes. Dangerous? Very.

Re:Firefox 111.0 enabled Origin private file system access by daveoc64 on Wednesday March 15, 2023 @10:04AM (#35168507)
That's how you end up with "March 2023 Report (Final) (Edited) (3).docx".

Making users repeatedly upload and download the same file to work with it is clunky.

Re:Firefox 111.0 enabled Origin private file system access by throw0101b on Wednesday March 15, 2023 @10:20AM (#35168698)
> That's how you end up with "March 2023 Report (Final) (Edited) (3).docx".

People having been doing that with Word and other local word processors using (SMB) file shares for decades. There's nothing special about web browsers that's causing it.

Re:Firefox 111.0 enabled Origin private file system access by comex on Wednesday March 15, 2023 @01:28PM (#35171781)
People using Word in this manner typically create a new filename only occasionally, not every single time they save. Browsers, on the other hand, will create a new filename every single time a download is initiated. That makes downloads impractical to use as a web app’s sole persistence mechanism; a few smaller web apps do so anyway but it’s rare.

And if they’re not the sole persistence mechanism, if downloads are just an export option separate from a ‘normal’ save, like you see in most web apps, then the 99.9% of users who don’t constantly export all their documents will have to deal with the consequences of the normal persistence mechanism. That is probably cloud storage, with associated centralization, privacy, and cost concerns, though it could also be browser-local temporary storage (cookies / localStorage / IndexedDB / origin-private file system), with reliability and portability concerns.

Re:Firefox 111.0 enabled Origin private file system access by worksonmine on Wednesday March 15, 2023 @10:36AM (#35168918)
I'd rather have the inconvenience of clicking the file I want to overwrite than accidentally giving a web-app access to something I didn't intend to. Making mistakes should be hard and intentional.
Re:Firefox 111.0 enabled Origin private file system access by account42 on Wednesday March 15, 2023 @06:56AM (#35166313)
> So it's also what real people actually want to use in browsers.

I am a real person and I don't want this.

Re:Firefox 111.0 enabled Origin private file system access by afavour on Wednesday March 15, 2023 @07:00AM (#35166336)
The OP already said 65% of users, it’s implicit that 35% of users don’t want to use it. It’s unclear to me why the views of you or that 35% should override the majority.
Re:Firefox 111.0 enabled Origin private file system access by unxdfa on Wednesday March 15, 2023 @07:11AM (#35166430)
65% of people who were asked with what question and what panel and what information provided?

This whole idea is stupid. Another C program with and ability to run arbitrary code off the network written by idiots and nasty folk being given arbitrary filesystem access. Have we learned nothing? We need more controls (MAC / process sandboxing) not less.

Just because someone wants to do something to make their lives easier and asks a set of people what they want who says yes doesn't mean it's a good idea.

I say this as someone who has written desktop/web integration stuff over the years without this.

Re:Firefox 111.0 enabled Origin private file system access by AshleysBrain on Wednesday March 15, 2023 @08:32AM (#35167267)
The File System Access API does not grant arbitrary file system access. At most it provides access to a folder manually chosen by the user, with limits on which folders can be accessed (e.g. root or entire documents folder is not allowed).
Re:Firefox 111.0 enabled Origin private file system access by Xelbair on Wednesday March 15, 2023 @07:36AM (#35166667)
It is unclear why the views of 65% should be also pushed onto me.
Re:Firefox 111.0 enabled Origin private file system access by afavour on Wednesday March 15, 2023 @08:48AM (#35167469)
You’re free to not use it?
Re:Firefox 111.0 enabled Origin private file system access by pooper on Wednesday March 15, 2023 @07:50AM (#35166795)
This is a logical fallacy and you should be ashamed of yourself for spreading it. You can "engineer" (manipulate) low information voters into voting a certain way. This means nothing.
Re:Firefox 111.0 enabled Origin private file system access by afavour on Wednesday March 15, 2023 @08:48AM (#35167461)
?!? No one is voting on anything. The OP was quoting the stats of how many users used a feature when it was put in front of them. Are you suggesting they “engineered” their users to save files on the local file system when they didn’t actually want to? To what end? What purpose would that ever serve?

Only on Hacker News would “we offered users the ability to save to disk and 65% used it” be seen as a sinister conspiracy theory.

Re:Firefox 111.0 enabled Origin private file system access by danaris on Wednesday March 15, 2023 @09:16AM (#35167877)
This is a point against your argument, not in its favour.

The percentages of users who use or don't use specific features, in isolation, cannot be effectively used to determine those users' opinions on the relative merits of those features. There are so many other factors at play that you really need to do some kind of explicit survey to determine whether, just as a for instance, some of those 65% would prefer a different way of saving files but don't have the choice (or think they don't), and, conversely, whether some of those 35% would be happy to use that feature, but don't know about it.

Re:Firefox 111.0 enabled Origin private file system access by afavour on Wednesday March 15, 2023 @09:37AM (#35168129)
Jesus Christ. It’s indicative, that’s all. No one is claiming it’s a statistically significant survey to the nth degree or anything. This is how people iterate products. You put a feature in front of people and see how many use it. How many the return to use it again. OP said they put the two options on an equal footing and 65% chose local disk save. It’s an indicator, nothing more, nothing less.
Re:Firefox 111.0 enabled Origin private file system access by norman784 on Wednesday March 15, 2023 @07:51AM (#35166806)
I suspect that the majority of those 65% of users (remember that most users are not tech savvy) just click ok on whatever popup appears, that does not mean that they want, but rather they don't understand.
Re:Firefox 111.0 enabled Origin private file system access by veeti on Wednesday March 15, 2023 @08:45AM (#35167430)
Are you really saying that the users of Construct, a 2D game engine, are not tech savvy or do not really understand what they are doing by granting local file access?
Re:Firefox 111.0 enabled Origin private file system access by worksonmine on Wednesday March 15, 2023 @09:34AM (#35168091)
Yes.
Re:Firefox 111.0 enabled Origin private file system access by mrguyorama on Wednesday March 15, 2023 @01:13PM (#35171496)
Millions of people use powerful Excel features every day to literally run the world, and yet malicious macros in office documents are still a prime way to hack any business. User is not the same as information security expert.
Re:Firefox 111.0 enabled Origin private file system access by AshleysBrain on Wednesday March 15, 2023 @08:30AM (#35167244)
To be clear, we also offer cloud save (e.g. to Google Drive), or downloading a copy of your project. Our software makes no particular effort to highlight any particular option. We see 65% of users freely choose the file system option, and most of the others use cloud save.
Re:Firefox 111.0 enabled Origin private file system access by mihaaly on Wednesday March 15, 2023 @08:46AM (#35167444)
> desktop web apps

....what?! ... World Wide Web Desktop? World Wide Web on my desktop? My desktop on the World Wide Web? There must be some confusion here. : )

If an app becomes desktop app why the heck using a browser?

Re:Firefox 111.0 enabled Origin private file system access by charcircuit on Wednesday March 15, 2023 @12:00PM (#35170344)
Because the web solved app distribution and sandboxing before desktop operating systems did.
Re:Firefox 111.0 enabled Origin private file system access by danaris on Wednesday March 15, 2023 @09:13AM (#35167838)
I'm a real person, and I'm deeply concerned by a) the way Chrome is trying to become the de-facto "standard" for web apps and bully or dare the other major browsers into following suit or being seen as "out of date", and b) the level of access Chrome is trying to give to itself and web apps running in it. Google is already very clearly exercising its market dominance in search and other areas to try to gain ever more of our attention and data.

I'm insufficiently informed about the differences between File System Access API and Origin Private File Access to have an opinion on which of those I think is a better choice, but please remember that Your Experiences Are Not Universal.

Re:Firefox 111.0 enabled Origin private file system access by dugmartin on Wednesday March 15, 2023 @11:52AM (#35170198)
The Origin Private File Access API seems to be a subset of the File System Access API. You can see Firefox 111 has been added to the browser compatibility chart here for most features:

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

Re:Firefox 111.0 enabled Origin private file system access by bombolo on Friday March 17, 2023 @03:39AM (#35194350)
Perhaps your sample is biased?