GoogleChromeLabs / browser-fs-access

File System Access API with legacy fallback in the browser
https://googlechromelabs.github.io/browser-fs-access/demo/
Apache License 2.0
1.38k stars 84 forks source link

options.fileName not used in file save #27

Closed arpu closed 3 years ago

arpu commented 3 years ago

Hey,

how can i use the options.fileName on the window.showSaveFilePicker https://github.com/GoogleChromeLabs/browser-nativefs/blob/master/src/nativefs/file-save.mjs#L23

tomayac commented 3 years ago

This will work once the underlying issue in the File System Access API gets resolved. Please subscribe to that issue to be updated of changes.

arpu commented 3 years ago

thx for the hint!

is there a way i can create the file on a directory handler with the filename?

tomayac commented 3 years ago

This should be possible, yes. Just note that this obviously only works on browsers that support the File System Access API, whereas browser-nativefs (the library in this repo) tries to have a reasonable fallback behavior for people on browsers that don't support the API.

arpu commented 3 years ago

perfect! will try this with latest chrome