Google photos api - Access-Control-Allow-Origin
Asked Answered
I

0

7

I am building a design tool to create fully customizable photo products like photobooks. I use technologies such as firebase (database and storage) and angular4. In order to integrate google photos with my web app I use the google photos api. When I try to edit user's photos with html canvas (toDataUrl) I get the following error:
"Access to Image at '...' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
I know what it means but i can't find any solution in order to edit user's photos and use them for printing purposes. Could anybody help me?

International answered 28/6, 2018 at 16:41 Comment(5)
Check if Google API is blocking the calls from localhost or the domain you are hosting the toolCiapha
Aside from setting up your own proxy server did you come up with a solution? Shutterfly requires Google Photos to be copied to their server before editing. I think this might be the reason.Collaborative
I have this same problem. I'm also using angular. Did you find a solution?Shark
Same here, relevant feature request here: issuetracker.google.com/issues/118662029Transpicuous
Having the same problem. Have you managed to find a solution?Tin

© 2022 - 2024 — McMap. All rights reserved.