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

Access-Control-Allow-Origin #62

Closed
riccardolorenzon opened this issue Aug 26, 2016 · 10 comments
Closed

Access-Control-Allow-Origin #62

riccardolorenzon opened this issue Aug 26, 2016 · 10 comments

Comments

@riccardolorenzon
Copy link

Hi,

Sometimes(i can't reproduce it though) i get a CORS exception while loading the image in the canvas, as result the image is rendered(with the crop) in a very small square area.
All the images i use are loaded from a S3 bucket(i already added the CORS configuration to it).

Am i the only one who is having this issue?

@DvirH
Copy link

DvirH commented Aug 31, 2016

I found a work around by loading the image to an element with image.setAttribute('crossOrigin', 'anonymous'); and blob it into the cropper.

@sekoyo
Copy link
Owner

sekoyo commented Sep 2, 2016

Thanks for the fix (merged), will hopefully publish v1.0.0 over the weekend with this fix in it

@sekoyo sekoyo closed this as completed Sep 2, 2016
@springuper
Copy link

springuper commented Dec 27, 2016

crossorigin="anonymous" not works in Chrome 54.0.2840.98, and it works after removing this attribute. passing null to crossorigin property fixes it.

@Grantlyk
Copy link

Grantlyk commented Jan 18, 2017

I'm currently having an issue with this, is anyone still having this issue?

I've resolved my issue, as @springuper says:

<ReactCrop 
  src={image.src}
  onComplete={onReceiveCrop}
  crop={crop} 
  disabled={!image} 
  crossorigin={null} 
/>

Will make a PR for a solution at some point

@sekoyo
Copy link
Owner

sekoyo commented Jan 18, 2017

Interesting, were you also trying to map the image on to a canvas?

@Grantlyk
Copy link

Yeah, all that stuff is working fine though

@sekoyo
Copy link
Owner

sekoyo commented Jan 18, 2017

Cool, so sounds like undefined should be the default as it used to be

@Grantlyk
Copy link

Yup, that's what I was thinking -- Do you want to PR it or should I?

@sekoyo
Copy link
Owner

sekoyo commented Jan 18, 2017

If you want to do it then great! I prob won't get around to it until friday/weekend cheers

@sekoyo
Copy link
Owner

sekoyo commented Jan 29, 2017

Fixed in v2.0.0

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

5 participants