menu

Questions & Answers

Does the Javascript File System Access API work with Mac? And if yes, are there any modifications needed for it to work?

I am sorry to ask a question that may have a simple answer, but I cannot find anywhere in the docs of the file system access api for javascript about platform specific support for this library. I have designed a web application that relies on this library, but have found that it only works with Windows users. Mac users are getting an error in the console that states "window.showOpenFilePicker is not a function". According to the Mozilla docs, it should be accessible with the safari version Mac users are running. I am running this service with HTTPS so it is not an insecure context issue and was wondering if anyone has run into the same problem and has a solution, or if not, a different way of accessing a Mac user's selected files/directories. Thank you!

Comments:
2023-01-17 23:10:05
"According to the Mozilla docs"... you mean these docs where it shows it only available in Chrome, Edge and Opera? See also Can I Use...
Answers(1) :

It's not OS dependent no, but currently it's browser dependent. MacOS users of Chrome will be able to use this feature, Windows users of Firefox won't. See the compatibility table of MDN which states that only Chromium based browsers support this.

Also note that while a subset of the File System API is standardized (and thus should be implemented everywhere), showOpenFilePicker isn't part of that subset yet.