Cannot load glb files from firebase bucket storage #4158
-
Cannot load glb files from firebase bucket storageAfter fetching the glb file from the firebase bucket, it shows this error that The files are of glTF versions 2.0, then too it shows this error I have stored an object which also contains link to glb file "product.glbFile" Can someone please help me to solve this issue I have tried this #3511 but it did not worked for me |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Please load the file in our editor, which runs the glTF validator and see if it produces any errors or warnings. |
Beta Was this translation helpful? Give feedback.
-
Got the answer for this issue, actually Firebase don't allow to fetch files directly (obviously for security reasons, except native web files like images). To access GLB files we need to change CORS header, which are not just rules that can be changed in Firebase>Rules. Here is the steps to Change CORS Headers: ....here in origin add the url of your site from where request is sent, to accept it from every site add this Step2: Download GSUTIL from here Step3: After intsallation open gCloud command line and run Step4: cd to the location of cors.json file and run Step5: Your CORS Header setting will be chnaged to confirm it run Now your are good to go and fetch files as needed, @elalish thanks for your support |
Beta Was this translation helpful? Give feedback.
Got the answer for this issue, actually Firebase don't allow to fetch files directly (obviously for security reasons, except native web files like images). To access GLB files we need to change CORS header, which are not just rules that can be changed in Firebase>Rules.
Here is the steps to Change CORS Headers:
Step1: Create cors.json file:
[ { "origin": ["https://your-website.com"], "method": ["GET"], "maxAgeSeconds": 3600 } ]
....here in origin add the url of your site from where request is sent, to accept it from every site add this
"origin": ["*"],
Step2: Download GSUTIL from here
You can follow this steps gsutil installation guide
Step3: After intsallation open gCloud command line an…