Load gltfs from aws

I’m having trouble loading .glb files from aws s3 buckets, e.g. https://www.babylonjs-playground.com/#JUKXQD#704

This worked fine until recently, now it doesn’t. Same result if I use the “root url” field. Same result with async loader. The playground example above isn’t using a signed url, but most of my content is. This model looks fine in the sandbox.

Pinging @bghgary

I am seeing some errors related to CORs headers in the web console of your PG, and found similar issues when trying to load GLTF files into the Babylon playground. It is likely that you need to add the headers to your s3 site, although a quick work-around would be to use Github to serve the models as it has them included.

Here is a forum discussing the issue:

On AWS you can use CloudFront to inject the headers into your server response:
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/add-origin-custom-headers.html

r

1 Like

Thanks, I had a strict cors rule on the public files, that was keeping it from appearing. Not sure what was preventing the signed urls (e.g. https://servicemedia.s3.amazonaws.com/users/5150540ab038969c24000008/gltf/1592526293146_korkusonly2b.glb?AWSAccessKeyId=1G198RB42M1G51PMNA02&Expires=1603375694&Signature=vq92NKG93Bje3kbMqD3Da8qx0q8%3D) from working yesterday, but now they seem to work fine.

2 Likes