Questions tagged [file-system-access-api]

Use this tag for questions about the W3C's File System Access API.

The W3C's File System Access API (currently being incubated), is a proposal for a new Web API that would give access to the user's disk.

This API allows to read or write Directories and Files on the user's disk.
It is currently exposed in Chromium based browsers.

Current specifications
Web.dev article

50 questions
2
votes
1 answer

React useEffect hook causes DOMException: User activation is required to request permissions

I have a React useEffect hook that will read local files previously approved by the user. To read the files, it uses the [FileSystemHandle.queryPermission()][1] method, which if not granted will prompt the user for access using the…
James Gentes
  • 7,528
  • 7
  • 44
  • 64
1
vote
0 answers

Trying to generate a 20+ gb zip file with JSZip + File System Access API, always fails around 20 GB

I've been experimenting with the file system access API recently to try to allow downloads of large directories from my site, where a page will start a write stream, start fetching the files, consolidate them into a zip file using JSZip, and save…
1
vote
1 answer

The File System Access API file writing gives error

When i run the following program: JS: async function write(){ const filehandle = window.showOpenFilePicker(); const writable = await filehandle.createWritable(); await writable.write('The file has been updated'); await…
1
vote
1 answer

Is it possible to use the File System Access API to watch a file?

I am working on a chrome extension that will prompt a user for a directory and then will upload specific files from that directory to the site that the extension is active on. Ideally, this extension would automatically upload these files when they…
1
vote
0 answers

Is it possible to use the File System Access API to play a video on the local file system via reference?

For context, I have a video player written in Electron that allows users to load video files from their local machine. It does this by setting the src of the file to a local file path. This "reference" to the file is required because video files…
Samuel
  • 2,331
  • 1
  • 22
  • 40
1
vote
0 answers

Use File System Access API in Chromium Embedded Framework

My program uses CEF(Chromium Embedded Framework) to implement a simple browser component. I want to use the File System Access API in the CEF to read and write local files but it occurs some problems.…
1
vote
2 answers

How can I prevent the File System Access API from saving file when an error occurs?

When saving a file using the File System Access API, if an error occurs between writing to and saving a new file, a file is still created and saved. Is there a way to prevent this file from being created and saved? As an example using the following…
GriffsAccount
  • 95
  • 1
  • 12
1
vote
1 answer

File System Access API: how to send a fileHandle with postMessage?

I'm working with the File System Access API and I have to send a FileSystemDirectoryHandle calling a postMessage(), according to this article it seems to be possible File handles are serializable, which means that you can save a file handle to…
1
vote
1 answer

The File System Access API createWritable() method works inside console, but not in script

I'm currently getting to grips with the File System Access API for a future project, and I am having difficulty using the createWritable() method in the line: const writable = await fileHandle.createWritable(); When I trigger it, it gives me the…
0
votes
1 answer

File System Access API - open/read a file without using showOpenFilePicker()

I wonder if there is a solution to open only one file directly without using showOpenFilePicker() function? I don't want to let other users to pick a different file but API would use only the correct one. I have a root and name of…
Orbit
  • 31
  • 4
0
votes
0 answers

Can an installed PWA create and upload mulitple files from a single user prompt via FileSystemAccessAPI?

I created a desktop app using Adobe/Harman AIR that I would like to recreate from scratch as a PWA. I'm researching if the PWA would be able to handle all the tasks that the AIR app does. One of the tasks the AIR app does is iterate through an…
Shaun
  • 2,043
  • 3
  • 27
  • 36
0
votes
1 answer

File access system api(wicg-file-system-access) is not loading in dev environment

I am using wicg-file-system-access to access local files for my angular application, it works correctly on localhost but when i deploy changes to dev environment it is not working, i see window.showSaveFilePicker is undefined. Is there any…
0
votes
0 answers

"AbortError: Blocked by Safe Browsing." when using the Filesystem Access API

When I try to write any data to a file handle using the Filesystem Access API in Chrome Version 110.0.5481.100 I get: AbortError: Blocked by Safe Browsing. I am saving a custom extension for my web app. Question A: How do I prevent getting this…
zino
  • 1,222
  • 2
  • 17
  • 47
0
votes
0 answers

trouble with async reucrsion of directories , with file system access api in react js

This code is designed to recursively iterate through a selected directory using the file system access api , and sent it via axios post request. I have an encountered 2 problems : I am struggling to find the right way to to enter subdirectories…
0
votes
1 answer

How can I save changes to a file selected from the user's computer in JavaScript?

Many modern web applications and PWAs allow users select a file from their hard drive, and then save changes back to that file directly. An old-school approach was to read the file, make the required changes on the server side, and then send the…
Toastrackenigma
  • 7,604
  • 4
  • 45
  • 55