Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How do I host glTF files from Amazon S3 and use them with <model-viewer>? #1015

Closed
IvanNov7 opened this issue Feb 11, 2020 · 1 comment
Closed

Comments

@IvanNov7
Copy link

Hello every one!
Trying to run the script with model from amazon s3 but cant load model.
Maybe anyone could tell me where is the problem and what i am doing wrong ?
Here is my example:

<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.js"></script>
<script nomodule src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"></script>
<model-viewer src="https://in3dreal.s3.eu-central-1.amazonaws.com/scene.glb" auto-rotate camera-controls></model-viewer>
@cdata
Copy link
Contributor

cdata commented Feb 12, 2020

Hey @IvanNov7 it looks like you're still not sending CORS headers in the response. Here is a help article I found on Google that describes how to enable CORS for an Amazon S3 bucket: https://docs.aws.amazon.com/AmazonS3/latest/dev/cors.html#how-do-i-enable-cors

I'm not an AWS expert, so that's the best information I can offer.

Note that you will need to enable CORS in the server that hosts your models if and only if that server is different from the one that hosts the <model-viewer> HTML. If you serve them from the same origin (that is, same protocol, domain name and port), then CORS should not be required.

@cdata cdata changed the title Run model from S3 storage How do I host glTF files from Amazon S3 and use them with <model-viewer>? Feb 12, 2020
@cdata cdata mentioned this issue Feb 24, 2020
11 tasks
@elalish elalish closed this as completed Jan 21, 2021
@google google locked and limited conversation to collaborators Jan 21, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants