Hi,
We have configured AWS S3 as per LANSA API docco and can put objects and get objects manually via Powershell.
However we are getting the following error from the xdemo image widget implementation code when running the LANSA Amazon S3 example employee image upload :
request_1.addEventListener("error", function () { return _this.fireOnUploadEnded("ERROR_NETWORK", "A network/CORS error has occurred"); });
Any suggestions?
Web console error talks about missing CORS header values
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://lansapc.s3-ap-southeast-2.amazo ... 6f1bd69721. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
AWS S3 storage using LANSA API (RESOLVED)
-
TonySupartono
- Posts: 2
- Joined: Fri Oct 11, 2019 12:13 pm
Re: AWS S3 storage using LANSA API
You’d need to enable CORS on the S3 bucket.
Have a look at this:
https://docs.aws.amazon.com/AmazonS3/la ... nable-cors
Have a look at this:
https://docs.aws.amazon.com/AmazonS3/la ... nable-cors
Re: AWS S3 storage using LANSA API
Thanks Tony, I had worked that out. However we don't have access to the AWS console due to our crazy security policies so I need to perform the CORS update via Powershell which I am struggling with. I have made attempts using various syntax but not managed to get it working yet. I don't really understand the AWS s3 example on how to upload a JSON syntax file version of the CORS config.
Re: AWS S3 storage using LANSA API
eventually got our Cloud guys to do the CORS config via the console, the example photo upload worked straightaway. Waste of everyone's time (including mine) sorry. We have painful RED tape here!