Skip to content
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

capture local files #126

Open
PlayTragic opened this issue Dec 23, 2024 · 0 comments
Open

capture local files #126

PlayTragic opened this issue Dec 23, 2024 · 0 comments

Comments

@PlayTragic
Copy link

I'm trying to build an image maker and am using this lib to download the result but it seems like handling local files causes an error.

Security Error: Content at http://localhost:1234/imagemaker may not load data from blob:

function imageDown() {
        modernScreenshot.domToPng(document.querySelector('#imageSave', {
            fetch: {
                requestInit: {
                    mode: 'cors',
                }
            }
        })).then(dataUrl => {
            const link = document.createElement('a')
            link.download = 'screenshot.png'
            link.href = dataUrl
            link.click()
        })
    }
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