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

CORS Error #101

Open
1 of 3 tasks
Ianec21 opened this issue Feb 1, 2024 · 3 comments
Open
1 of 3 tasks

CORS Error #101

Ianec21 opened this issue Feb 1, 2024 · 3 comments

Comments

@Ianec21
Copy link

Ianec21 commented Feb 1, 2024

Description

When I am trying to convert my div into an image, I receive this error. I am getting images from firebase bucket storage. Can I somehow put no-cors argument in the fetch method?

Access to fetch at 'https://firebasestorage.googleapis.com/v0/b/testmd-21f8a.appspot.com/o/images%2Fimagini-itemi%2F1706719835228Item%202%20Bac-01.jpg?alt=media&token=b7845988-f909-4ac3-b856-037a77f46ffd' from origin 'http://localhost:5173' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Link to Reproduction

Steps to reproduce

  1. Create an div.
  2. Try to convert the div to an image.

Version

latest

Browser

Google Chrome

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

None.

@hugocxl
Copy link
Owner

hugocxl commented Feb 8, 2024

it seems not to be related to this React implementation but an issue from "html-to-image". Could you give it a look?

@xandemon
Copy link

@Ianec21 can you show how you are converting div to image? It should directly return you a base64 data I think

@bridger217
Copy link

+1 same exact issue

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

4 participants