-
Notifications
You must be signed in to change notification settings - Fork 9
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
Unable to get access from S3 #39
Comments
I will have a look at this issue. Please, provide me such a link to test it locally. Also you can contribute. Fork the project and tray to see. The access to the image it's through an canvas which instantiate a IMG element. And i remember I have to pass a certain settings in order to resolve that issue, for general links because on the end the img was not inserted into the DOM and by default the browser could block that like a possible attack? Do you understand the context. Now we have to see why the S3 and the kind of request this strategy is performing that doesn't fullfil all the security requeriment of S3 |
I was reading about ypur issue, You should try with this CORS configuration: |
I updated my CORS settings as you suggested, but I'm still get the same error. It works with an img tag Here are my updated settings:
The full error states: _ERROR Error: Uncaught (in promise): Error loading the src = https://ecomzabucket.s3.af-south-1.amazonaws.com/Geekvape-L200-(Aegis-Legend-2)-Classic-Kit-img-main Here is a link to an S3 item if you want to test it: |
Once yo have a successfully npm install. You have to run the compilation of the library which is located in the lib folder. Go to the package json and you will see the command to start the dev mode for the library. I think is yarn test-library. Then run ng serve in another command tab, that will run the example project. Then you have the environment ready |
I take an URL from s3 and add it to the picker's _imageSrc attribute, but I am getting the following error:
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource
If I add the image to an img tag then it works and if I take a random image form the internet as the picker's _imageSrc then it works. But the documentation doesn't state how it get's access to the image, i.e. post, put, etc.?
Here are my S3 settings:
Policy:
CORS settings:
Picker's code:
The picker.imageSource is the s3 URL
e.g.
https://ecomzabucket.s3.af-south-1.amazonaws.com/Onyx-Max-5000-Puff-Disposable-Rechargeable-img-main
What should be adjusted to the settings of s3 so that the picker gets access to the image/resource?
The text was updated successfully, but these errors were encountered: