html2canvas blocked images from S3 bucket

Hi,

I have a big headache problem with cros access, when I use the html2canvas to download image from linode object bucket and adding to pdf I get this error "Access to image at * from origin 'http://127.0.0.1:8001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
I try add cors and enabling but still.. any idea ?

1 Reply

I've done some research on this and it seems like there are a lot of factors that could be causing your issues. With the information I have available, I'd recommend checking out the solutions in this StackOverflow discussion.

There are several options there that could work, including modifying your CORS Policies or the code for html2canvas. While some of those answers are older, there is a recent response that seems straightforward that I personally would start with.

Ultimately, the best option for you will come down to the specifics of your workflow. If you're not able to get it working with those suggestions, I'd recommend responding with more information about any specific policies, scripts, requests, headers, etc., that would help someone in our Community to give you a more tailored response.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct