43 questions
0
votes
1
answer
168
views
Performance problem with the FileSystemWritableFileStream.write method
Context
One feature of my web application is copying file from A to B on user's machine, not in the OPFS. The destination (B) is a mounted NFS, so the write speed is the Internet upload speed.
File ...
1
vote
1
answer
465
views
Fileystem API showDirectoryPicker() permanently broken if user doesn't choose a directory in Electron
This issue occurs in the latest version of Electron, but not in Chromium outside of Electron.
The following example code uses the Filesystem API's showDirectoryPicker method to open a directory-picker ...
2
votes
0
answers
262
views
How to get FileSystemDirectoryHandle using a FileSystemFileHandle
I am trying to select a file using showOpenFilePicker and once a file is selected, I want to get the directory(FileSystemDirectoryHandle) of where the selected file is located. I want to get the ...
0
votes
1
answer
145
views
Chrome browser page reloads when executing a Save or Save As using The File System Access API
I created a test html/js program (using VS-Code and Go Live) that simply increments some state variables that I could Save, Save As, and Open/Load to experiment with The File System Access API. When I ...
0
votes
0
answers
146
views
FileSystemAPI fails due to SecurityError
I'm facing a weird error with the File System API. I'm trying to download a PDF generated from a batch of images when the use clicks a button.
Here is my current code:
mainContainer.addEventListener('...
0
votes
0
answers
59
views
How do I iterate through files in a web accessable directory?
I am developing a chrome extension, and I want to allow my users to add their own assets to an assets folder. However I can't figure out how to access the files if I don't know their exact name.
In ...
4
votes
2
answers
1k
views
Can't access 'createSyncAccessHandle' on type FileSystemFileHandle
Property 'createSyncAccessHandle' does not exist on type 'FileSystemFileHandle'.ts(2339)
const root = await navigator.storage.getDirectory();
const File1 = await root.getFileHandle('file.txt', { ...
-1
votes
1
answer
56
views
FileSystem API fails to write file when called from popup window
I have an application where I want to save files of browser generated data to be saved on local disk. Sometimes i might want to edit this data before storing it, therefore i display it in a text-area ...
2
votes
0
answers
208
views
How get list Provides a handle to a directory entry in File System Access API?
I am get directory from file system and read data.
try {
const directoryHandle = await showDirectoryPicker({
startIn: startIn.value,
});
for await (const [name, fileHandle] of ...
1
vote
0
answers
781
views
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, ...
1
vote
0
answers
316
views
Flushing file's with webkit's filesystem API with Safari
I am trying to use filesystem api to create permanent files, write and read data from them.
Although I succeeded creating the file and writing data to it, after calling flush() the file becomes empty (...
1
vote
0
answers
183
views
non-deprecated replacement for FileSystemEntry.toURL()
I am planning a project where I will need to be able to access files from the File and Directory Entries API through the browser through URLs with actual file paths (unlike blobs) and the ...
0
votes
1
answer
176
views
View and edit file permissions disappear unexpectedly in Chrome with Plotly Dash
Problem:
My Plotly Dash app (python) has a clientside callback (javascript) which prompts the user to select a folder, then saves a file in a subfolder within that folder. Chrome asks for permission ...
0
votes
1
answer
518
views
Store canvas screenshot to local filesystem with Filesystem API
I am developing a small web-application with a threejs Renderer where I want to be able to store some screenshots to my local filesystem at a specific location. Rendering the images and creating the ...
4
votes
1
answer
5k
views
Get a list of all files within a directory in a client machine using browser
The use case here is not that important though but the use actually is. I want to browse the users local file system via browser like we do via <input type="file"> but instead of ...
3
votes
1
answer
2k
views
File System Access API open file with local default application
In a web application I am working on I would like to be able to download files, modify them localy and reupload them to the server.
To make it as easy as possible for the users, I would like them to ...
3
votes
2
answers
4k
views
File System API states it can't open the documents folder because it contains system files, which it doesn't
I am struggling to understand if this is a bug or a feature of the new File System API. When using showDirectoryPicker and selecting the standard Windows documents directory, or the downloads ...
4
votes
2
answers
669
views
How to avoid two sequential alerts (one for read and one for edit) when using `window.showDirectoryPicker()`
const dirHandle = await window.showDirectoryPicker();
await dirHandle.requestPermission({ mode: "readwrite" });
I'm using the File System Access API in chrome. I'd like to let the user pick ...
0
votes
1
answer
59
views
Does read/write fixed length with java FileChannel improve performance?
I am a newb in Java programing, and confused about IO API.
For System API, read/write a entire block works faster than a random bytes. Can Java implements this feature? Or how to optimize performance ...
4
votes
1
answer
2k
views
Is there a way to programmatically set the default directory with File System Access API
Is there a way to set a defined directory path programmatically instead of showing the file explorer with .showDirectoryPicker() for the user to select the actual path?
0
votes
1
answer
483
views
Access directories which look like files on Mac
I am creating a script for Chrome browser to handle files (using File System Access API). This is totally fine on Windows, but on MAC I have this issue:
The files are stored in folders which look like ...
2
votes
1
answer
1k
views
How to use html5 drag-drop functionality with FileSystemAPI?
I am using the FileSystemAPI window.showDirectoryPicker() to open a directory which is returning a handle to that directory & by using that I can traverse all the files present in that directory.
...
1
vote
1
answer
225
views
FileSystemAPI not working for directory containing large no of files?
I am using below code which uses FileSystemAPI with webworker
const worker = new Worker( "worker.js" );
btn.onclick = async (evt) => {
const dirHandle = await showDirectoryPicker();
...
1
vote
1
answer
367
views
Alternative to deprecated FileSystemEntry.remove() function?
I am using the new(ish) File System Access API and I need to delete a file. I was going to use the remove() method, but it is deprecated. Is there a currently supported function for deleting files in ...
0
votes
1
answer
402
views
Rename filename.ext.crswap to filename.ext rather than copying
When performing this sequence
Obtain a handle to a new file via window.showSaveFilePicker, say filename.ext
Obtain a writeable file stream from the handle
Write some content into the file using the ...
5
votes
1
answer
6k
views
How to provide default filename for showSaveFilePicker
I am wanting to provide a spinner in my web app as I download a file from the server and then save it using the File System Access API.
I can do this using the showSaveFilePicker() but it seems very ...
2
votes
1
answer
936
views
Store the path to uploaded file on client-side or the file outside the browser for offline
Is there a way to store the path to file which user wants to upload, but doesn't have an internet connection (it's a PWA) and reupload it when a connection is back? Or maybe not store the path, but ...
1
vote
1
answer
554
views
Is it possible to use local SQLite3 file with FileSystemAPI and WebAssembly in a web app?
Considering that:
Browser's File System API enables web apps to write on local files, without subsequent asks for permissions.
WebAssembly can run a native SQLite3 client.
It's possible to create a ...
0
votes
1
answer
194
views
Changing format of the file
Can I change the format of the file by using Native File System API? For example, when I read the every .pdf files of the one directory and changed them to the .jpeg files?
1
vote
2
answers
991
views
How do I actually add Filesystem Access API to javascript?
I've found this https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API to allow javascript to access the local file system. I feel really dumb, but I can't find anywhere that talks ...
0
votes
1
answer
460
views
Checking whether website showDirectoryPicker JS function with Puppeteer
Hello I want to get check whether the website has showDirectoryPicker function with the puppeteer.
Currently my code looks like this:
'use strict';
const puppeteer = require('puppeteer');
(async ...
2
votes
1
answer
559
views
Overriding showOpenFilePicker with Puppeteer
As illustrated in here here, Puppeteer allows to override Javascript functions. I want to override showOpenFilePicker function. That is, when the showOpenFilePicker invoked by the web page. I want to ...
0
votes
1
answer
211
views
How to Intercept Native File System API calls made by web application?
How can I intercept API calls made by the web application? For example, how can I know the web site uses native file system api and intercept its function when user invokes the above function?
await ...
2
votes
1
answer
277
views
Need to hook to function of the Web API, is it possible?
I'm trying to hook into a function that comes with the File System Access API.
For example when the web site used the File System Access API as shown in below.
// store a reference to our file handle
...
3
votes
1
answer
2k
views
Persist file descriptor across page reload in Chrome with FileSystemFileHandle
As we all know browsers do NOT support repopulating file path to <input/> file across page reload, due to security reasons. But recently chrome 86 has released File System Access API, that ...
0
votes
1
answer
698
views
unable to read/write files from web worker
I am trying to read the text file (log.txt) which has already been created in my local machine and want to append text to the same file from webworker using the filesystem api methods but unable to ...
2
votes
1
answer
2k
views
FileSystemApi and writableStream
I'm trying to use the FileSystem API to write an uploaded file on a SPA to a Local sandboxed FileSystem using the FileSystem API.
The File Is uploaded with drop acion and I can get the File object ...
0
votes
1
answer
443
views
Edge browser Native File System removeEntry use
I'm working with the newest version of Edge (Canary release 86.0.615.0) and I can get the new Native File System API showOpenFilePicker to let me access files but I can't find a reference to the ...
4
votes
1
answer
2k
views
Using Native File System API to save file to a specific location without user interaction?
I have my own custom system that needs to create txt files in order to print cash receipts when there is a new order. I need those files to be saved locally to the computer to a specific location, but ...
1
vote
2
answers
2k
views
How to read a file content in Native File System API
I am trying to read the content of the XML file. Probably this is basic JS stuff, but I seem can't make it work.
I am using Chrome's experimental Native File System API to read folders in folder:
...
3
votes
1
answer
2k
views
Open folder in Windows Explorer using Native File System API
Note: There are already some questions on how to open Folder on User device using Javascript. however, these questions were asked, before the Native File System API.
How to open Window File Explorer ...
0
votes
1
answer
937
views
Need to fetch path of the directory selected through chooseFileSystemEntries
We are creating an offline player to minimize buffering with the FileSystem API. I am able to open a directory and fetch videos from there but I am still unable to fetch the path. I am looking to get ...
2
votes
1
answer
436
views
Chrome File System API hanging
disclaimer, self-answered post to hopefully save others time.
Setup:
I've been using chrome's implementation of the file systems API, [1] [2] [3].
This requires enabling the flag chrome://flags/#...