Skip to content

Download of files disabled in built-in Chromium? #246

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

Open
ghost opened this issue Mar 2, 2022 · 2 comments
Open

Download of files disabled in built-in Chromium? #246

ghost opened this issue Mar 2, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 2, 2022

Is download of files disabled in the current chromium version used by OverlayPlugin? I tried creating a link and simulating a click with click() to download a stringified object but it looks like it doesn't work (no errors in console). I can import/read files just fine by simulating click() on an input tag though.

Example:

    const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(settings));
    const link = document.createElement("a");
    link.setAttribute("href", dataStr);
    link.setAttribute("download", "settings.json");
    e.target.parentElement.appendChild(link);
    link.click();
    e.target.parentElement.removeChild(link)
@ghost
Copy link
Author

ghost commented Mar 2, 2022

I tested the method both in Firefox and Chromium 101.0.4921.0 (Developer Build) (64-bit) but it appears it's not usable with the built-in version used by the plugin.

image

@ngld
Copy link
Owner

ngld commented Apr 12, 2022

Downloads have to be implemented (since it's part of Chromium's UI and OverlayPlugin replaces the UI). I'd have to figure out where to save the download, maybe ask the user whether the download is desired and once that's done, perform the download (maybe show download progress) and notify the user that the download is done.

It's a rare use case so I probably won't work on this but I'd accept a PR that does this (though we should probably discuss details like the download prompt, notification, etc. first).
As a workaround, you could write the data to the user's clipboard instead.

sandtechnology pushed a commit to sandtechnology/OverlayPlugin that referenced this issue Sep 21, 2023
Update RSVData opcodes for KR 6.35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant