0

I want to crop image from external server and save it on mine. But I have many troubles with CORS policy, when trying to call

cropper.cropper.getCroppedCanvas().toBlob( (blob) => {
    console.log(blob);
    //and my ajax request
});

Any help will be appreciated. thanks

Cutis
  • 949
  • 1
  • 13
  • 32
  • Does this answer your question? [No 'Access-Control-Allow-Origin' header - Laravel 5.4](https://stackoverflow.com/questions/43565877/no-access-control-allow-origin-header-laravel-5-4) – AH.Pooladvand Dec 16 '19 at 14:17
  • Please, let me try to see. thanks – Cutis Dec 16 '19 at 14:31
  • I am afraid, this does not change anything. – Cutis Dec 16 '19 at 15:18
  • If I understand this correctly, the No Access CORS response is coming from the external remote server, right? If so, it's the remote server that has an issue with the request headers. Perhaps you should consider using the Guzzle instead of CropperJS. – Azeame Dec 17 '19 at 02:15
  • You need to configure your remote server so it sends the `access-control-allow-origin: *` and `access-control-allow-methods: GET, OPTIONS` headers. – Rik Dec 17 '19 at 06:48

0 Answers0