There is a webapi in development that could be used to allow users to open/create a save file once and then repeatedly save to the same file without creating a bunch of dumps in the users download folder
https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker#browser_compatibility
Example generated by Chatgpt:
// Open file
async function openFile() {
const [fileHandle] = await window.showOpenFilePicker();
const file = await fileHandle.getFile();
const contents = await file.text();
console.log(contents); // Load file contents
return fileHandle; // Return handle for saving
}
// Save file
async function saveFile(fileHandle, data) {
const writableStream = await fileHandle.createWritable();
await writableStream.write(data); // Write new content
await writableStream.close();
}
Edit: might be more readily available then I initially thought https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle
There is a webapi in development that could be used to allow users to open/create a save file once and then repeatedly save to the same file without creating a bunch of dumps in the users download folder
https://developer.mozilla.org/en-US/docs/Web/API/Window/showOpenFilePicker#browser_compatibility
Example generated by Chatgpt:
Edit: might be more readily available then I initially thought https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle