Open Carrie999 opened 5 years ago
This is unrelated to exif-js as far as I can tell. You have to provide more context of your problem for anybody to help you. CORS is not an error, it is a feature ;) (to prevent things like DDOS attacks from front-end code).
Are you trying to get exif information from a picture that is on another domain? By providing an absolute URL to an image? You have to have a picture locally, or retrieve the picture through back-end code first (useing exif in NodeJS?), because the back-end does not enfore CORS policy. But browsers do... You can install an extension in your browser that circumvents CORS, but that is not a solution you should require/force of users of your front-end.
CORS issues in principle have to do with back-end code or back-end configuration. Please investigate this more. You can solve it two ways:
From what I understand, if you're hosting images on S3, they need withCredentials = true
set on the XMLHttpRequests, otherwise the CORS policy won't be returned. @Kuchitama's pull request fixed it for me https://github.com/exif-js/exif-js/pull/187
How do we solve this issue I keep getting blocked by cors error