-
Notifications
You must be signed in to change notification settings - Fork 121
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 CORS policy: #143
Comments
@ArnurArykbaev , I also was facing this problem and I made a workaround by opening the file, then converting it to base64 and put that in the export function convertFileToBase64(fileObject) {
return new Promise(async (resolve, reject) => {
try {
const reader = new FileReader()
reader.readAsDataURL(fileObject)
reader.onloadend = function() {
const base64data = reader.result
resolve(base64data)
}
} catch (error) {
reject(error)
}
})
} However, if someone knows how to solve this error, and not just workaround, I will be happy to hear that. I have some cases where the image will be taken form AWS S3 Bucket, which gives me exactly the same error when running it locally. |
Access to image at 'someMyURL' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
The image appears in img tag, but in vue-qr it gives an error
The text was updated successfully, but these errors were encountered: