I had followed the Esri Imagery Workflow for OIC and published and view the Esri Campus images using OIC web app, and it worked well.
I tried to use my images which I took using an IPhone, selected terrestrial frame camera as type, however my workflow involved using local images because I didn't have access to S3 at the time. The exposure points were created and everything worked fine and may have selected the add image as attachment when publishing to Enterprise therefore I was able to view the images on the OIC web app.
However, the problem seems to arise when I hosted the images on Amazon cloud. The bucket where the images are stored have been public, and the links work fine. However, when adding the OIC to the web map, and clicking one of the exposure points, it takes forever to load up the images.
I've attached my ImageList text file, in case someone wants to replicate the problem
Solved! Go to Solution.
Hi IniobongBenson,
The issue you are facing is because of a CORS policy that needs to be set on your bucket.
Assuming you know how to access your AWS console follow these instructions below to set the CORS Policy.
It is required to set Cross-origin resource sharing (CORS) policy in S3 for web applications that are loaded in one domain for interacting with resources in different domains. Please refer below screenshot and script for reference:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>
Hi IniobongBenson,
The issue you are facing is because of a CORS policy that needs to be set on your bucket.
Assuming you know how to access your AWS console follow these instructions below to set the CORS Policy.
It is required to set Cross-origin resource sharing (CORS) policy in S3 for web applications that are loaded in one domain for interacting with resources in different domains. Please refer below screenshot and script for reference:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
</CORSRule>
</CORSConfiguration>
Thanks @RandallRebello I was able to solve this with your suggestion. However, AWS now required CORS policy be provided in JSON format which I was able to look up and provide
@IniobongBenson I had the same problem but in Azure - @RandallRebello I followed your instructions to set up a CORS rule for the container - thanks for the advice I am able to see the images.
Amazon S3 requires this CORS policy in JSON. Please post the CORS policy in JSON.
I used an XML to JSON converter that gave the JSON below but that gives an error in Amazon S3: 'Expected params.CORSConfiguration.CORSRules to be an Array'
Here is the JSON I tried:
{
"CORSConfiguration": {
"xmlns": "http://s3.amazonaws.com/doc/2006-03-01/",
"CORSRule": {
"AllowedOrigin": "*",
"AllowedMethod": "GET"
}
}
}
Hi @adevadas ,
Here is the script in json fromat.
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"GET"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [],
"MaxAgeSeconds": 3000
}
]
Randall
Thank you sir! Works great.