-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Support permissions for chromium File System Access API #18267
Comments
Playwright does not currently support the File System Access API [Related Issue](microsoft/playwright#18267)
I really need this in playwright! |
Likewise, I would benefit from this as well! |
I would also love this feature. 🙏 |
For intrepid future travelers, I bypassed this by In the browser page: async function blobToBase64(blob) {
return new Promise((resolve, _) => {
let reader = new FileReader();
reader.onloadend = () => resolve(reader.result.split(',')[1]);
reader.readAsDataURL(blob);
});
}
window.getFilesAsB64 = async function () {
// Get a list of filenames and a list of blobs somehow
let files = {};
for (let i = 0; i < blobs.length; i++) {
files[filenames[i]] = await blobToBase64(blobs[i]);
}
return files;
} In the files = await page.evaluate("window.getFilesAsB64()")
for filename in files:
with open("./"+filename, "wb") as binary_file:
binary_file.write(base64.b64decode(files[filename])) |
It's not a workaround for this issue, but a workaround for file writing. In fact, we want permission support for FileSystem Access API just because we are using this API and want to test programs relying on this. If we just want to read/write files, we can use workarounds instead. |
This would really come in handy for my team as well. Our app relies heavily on the FSA API |
I need this too! 🙏 I bet the Microsoft devs behind https://vscode.dev (which uses the Filesystem API) would appreciate it also. |
I need this feature |
+1 would be awesome if Playwright supported these APIs |
also need |
how long do you intend to "collect feedback" for..? |
Why is it that github.com is filling up with more and more people complaining about how long tickets have been open for? |
This comment has been minimized.
This comment has been minimized.
Are there any news if or when this could be supported? I'm also eagerly waiting for playwright to support this. |
For those having the issue, I have implemented a workaround on my app. Instead of providing the |
I am the author of bangle-io - a library which allows taking note locally thanks to the File System Access API.
Currently Playwright doesn't support accepting permissions (see the screenshot) to view/edit a local file using the following api.
Do you think others might benefit from this as well?
This will benefit folks writing robust apps which provide local first support.
The text was updated successfully, but these errors were encountered: