Closed tomasgrunt closed 8 months ago
Just did a quick experiment. You need to pass a FileSystemHandle
as the startIn
option, and it does work if this points to a network location. I have split it up in two buttons so you can see the effect more easily.
import { fileOpen } from 'browser-fs-access';
let handle;
document.querySelector('.button1').addEventListener('click', async () => {
try {
const file = await fileOpen();
handle = file.handle;
} catch (err) {
console.log(err)
}
});
document.querySelector('.button2').addEventListener('click', async () => {
try {
const file = await fileOpen({
startIn: handle
});
} catch (err) {
console.log(err)
}
});
Hi,
this is not an issue but I would like to know, if this browser-fs-access can be used for:
Thank you