I'm developing a small javascript browser script that retrieves files from S3.
I can display the images in an tag without any issue after requesting a SignedUrl to S3. To do so I updated the CORS policy on S3:
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET",
"HEAD",
"PUT",
"POST",
"DELETE"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": []
}
]
However when I want to use the same URL to extract the EXIF data (using ExifReader), I get an error message about CORS policy:
Access to fetch at '*SIGNEDURL*' from origin 'null' has been blocked
by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
If an opaque response serves your needs, set the request's mode to
'no-cors' to fetch the resource with CORS disabled.
I don't understand the difference in the behaviour of both. Can someone help?
Thank you
from CORS Request to S3 Accepted for File Display but Not for Load by Javascript Library
No comments:
Post a Comment