Skip to main content

Hosting 360 Degree Videos and Images in a CORS Supported Server

Why: If you have been playing with 360 degree videos and images like me in the recent past (specially with the awesome release of Mozilla aframe.io) then probably you are looking for an inexpensive or preferable free place to host your images/videos since most of the free places where we can upload them don't support CORS.

How: 

Using AWS to Host 360° Virtual Reality Panoramas & 360° Video


AWS S3 has no inode limit and works especially well with multi-res panorama. AWS S3 also works well for large streaming 360° Video Files.

Create an AWS S3 Account

If you do not already have an AWS S3 account, sign up for a Free Amazon Web Services Trial Account, see the following video for details

Create a Bucket

Once you have created your account you will need to create at least one Bucket, see the following video for simple instructions if you are not already familiar with basics of using AWS S3

Set permissions for your bucket

use the AWS web interface to set AWS Bucket Policy & CORS Configuration, setting these as below will automatically set public read access permissions for all files in that bucket, otherwise you will have to set permission per file and may have trouble viewing your panoramas


AWS S3 Bucket Permissions: Bucket Policy and CORS Configuration

Go to your "All Buckets" list on your S3 page, click on the "Properties" button in the upper right, select your bucket, and click on the "Permissions" option, and set the following -

Edit Bucket Policy -

Replace MY_BUCKET_NAME with the name of the bucket you are editing

{
"Version": "2008-10-17",
"Id": "http referer policy example",
"Statement": [
{
"Sid": "readonly policy",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::MY_BUCKET_NAME/*"
}
]
}

Add CORS Configuration

<CORSRule>
        <AllowedOrigin>http://*
        <AllowedOrigin>https://*
        <AllowedMethod>GET</AllowedMethod>
        <MaxAgeSeconds>3000</MaxAgeSeconds>
        <AllowedHeader>Authorization</AllowedHeader>
    </CORSRule>
</CORSConfiguration>

Uploading Panoramas

You can upload your panoramas to AWS S3 either using the web interface, or with ftp clients such as Cyberduck or Transmit, and many others

Popular posts from this blog

LibrePlanet 2017: Liberating your open source experience

LibrePlanet is a yearly gathering of free software activists, users, and contributors—and, it's my favorite conference of the year. Here's why.
LibrePlanet is run by the Free Software Foundation, and has steadily evolved from a yearly members' meeting with presentations from staff and board members to a full blown two-day conference with speakers and attendees from all over the world. The event brings people who care about free software together to talk about the future of the movement, address current challenges, and celebrate successes.
Prelude I was invited to give a talk at LibrePlanet 2017 on 25th March at MIT, in Cambridge, Massachusetts representing Mozilla as a Tech Speaker. I reached Boston on 25th early morning. Around 1 AM. The journey itself was awesome till I realized that you don't get Uber or Lyft at Boston Airport.

Not that the apps don't function there. They work! Just no driver will be ready to pick you up from Airport at that time. After trying t…

Maximum Call Stack size exceeded: My mishap with nodejs and MongoDB

Working with nodejs is always an adventure and mix MongoDB with it, and it becomes very interesting for a nodejs enthusiast like me.

While working on a pet project involving Native MongoDb driver and nodejs I encountered a weird problem.

RangeError:MaximumcallstacksizeexceededAs usual my first thought was to Google out what I was facing and googling it out led me to the following to links.RangeError: Maximum call stack size exceededCalling Model.collection.save() RangeError: Maximum call stack size exceeded Also In some posts in MongoDB’s forum I saw that peoples said saving in `process.nextTick` or wrapping the call function in `parseInt` will also fix the problem, but it most certainly didn't work for me.So I started digging in on my own and soon enough found the reason.

If you’re trying to save a document and saving process somehow exited with an RangeError: Maximum call stack size exceeded exception, it’s related to what you want to save in the database. I had this problem a…

All Hands 2016: MozLondon, A recount

I recently had the opportunity to take part in Mozilla All Hands 2016 (a.k.a #MozLondon). Mozilla All hands. All Hands are bi-yearly events of Mozilla where all the paid staff from different teams around the globe meet with each other along with a handful of invited volunteers to disscuss about future projects and get some work done! This year it was in London and just immediately before Brexit (I actually didn't even know about it before I went there). It was a work week, so essentially the event spanned from Monday to Friday. I arrived at LHR on Monday morning, and then there was the awesome Heathrow Express which took me to Paddington, just a 7 mins walk away from Hilton Metropole where I was staying with a bunch of other people. The event started with all of us having an evening orientation familiarizing us with rules and regulations along with Code of Conduct(that turned out to be really important later on...).  Tuesday started with a Planery. Which you can see if you are lo…