Questions tagged [native-file-system-api-js]

Questions related to The new Native File System API which allows web apps to read or save changes directly to files and folders on the user's device.


References

40 questions
1
vote
1 answer

Persist file descriptor across page reload in Chrome with FileSystemFileHandle

As we all know browsers do NOT support repopulating file path to file across page reload, due to security reasons. But recently chrome 86 has released File System Access API, that simplifies and allows users to read context of the file. If…
deathangel908
  • 8,601
  • 8
  • 47
  • 81
1
vote
1 answer

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 is there a way to save the file to that location…
Dimitar
  • 1,830
  • 5
  • 32
  • 52
1
vote
2 answers

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: const opts = {type: 'open-directory'}; handle =…
koubin
  • 579
  • 5
  • 9
  • 30
0
votes
0 answers

Save client side large set of data to local file on Chrome Android with streams

I have a code that decompiles a video and generates a new video, all on client side. As the videos are large, the output of the video muxer is directed to a writablestream, so the data is consumed as it is generated to prevent excessive memory…
0
votes
0 answers

File System Access API: how to get the content of file stored in the indexedDB

How I can retrive the content of a file using the following code that get a file stored in indexedDB button1.addEventListener('click', async () => { try { const fileHandleOrUndefined = await get('file'); if (fileHandleOrUndefined) { …
0
votes
0 answers

Using move() method of File API

I'm trying to process local files in browser using File API. Everything works fine except the move() method gives exception: "Uncaught (in promise) DOMException: The user aborted a request." Browser prompts me to allow the activity in folder: "Save…
Riho
  • 4,523
  • 3
  • 33
  • 48
0
votes
0 answers

How to select the filechooser value automatically for a web application which uses File_System_Access_API method window.showDirectoryPicker()

It would be much appreciated if someone could help with some pointers in handling a window.showDirectoryPicker() through selenium or puppeeter or webdriverio .The web application uses…
0
votes
0 answers

Puppeteer: how to access/intercept a FileSystemDirectoryHandle?

I'm wondering if it's possible within puppeteer to access a FileSystemDirectoryHandle (from the File System Access API). I would like to pass in a directory path via puppeteer as though the user had selected a directory via…
0
votes
0 answers

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 FileSystemEntry.toURL() satisfies that need. However, while…
0
votes
1 answer

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 to read and write to the folder, which is fine,…
0
votes
1 answer

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 snapshots works, only the storage/download part…
nhaggen
  • 301
  • 2
  • 8
0
votes
2 answers

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 directory, a pop-up appears stating that it can't open…
Taz Evans
  • 37
  • 1
  • 7
0
votes
1 answer

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 during Java IO? I am pretty appreciated for…
leonbear
  • 104
  • 11
0
votes
1 answer

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 files on MAC. For example folder name is…
0
votes
1 answer

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. const dropArea =…