# Load Upload GLB file in Scene not work

**URL:** <https://forum.babylonjs.com/t/load-upload-glb-file-in-scene-not-work/25405>\
**Category:** Questions\
**Created:** [November 18, 2021, 5:22pm UTC](https://forum.babylonjs.com/t/load-upload-glb-file-in-scene-not-work/25405 "2021-11-18T17:22:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbrose](https://avatars.discourse-cdn.com/v4/letter/r/b9e5f3/32.png) [@rbrose](https://forum.babylonjs.com/u/rbrose)\
**Post date:** [November 18, 2021, 5:22pm UTC](https://forum.babylonjs.com/t/load-upload-glb-file-in-scene-not-work/25405/1 "2021-11-18T17:22:35Z")

</div>

Hello,

i try upload a file and load it directly in scene. But i get this error see screenshot.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/2/0/20292eb1be1196d32be80cc11eeb77e65c6ae4e5.png)

Load this file in Sandbox works fine. What is wrong here?

After Upload is finished i put “data:application/octet-stream;base64” into SceneLoader.

```auto
   if (["loadend", "load"].includes(event.type)) {
        console.log("finished loading file");
        currentProgress.value = "Finished loading file";
        fileUrl.value = reader.result;

        BABYLON.SceneLoader.Append(
          "",
          fileUrl.value,
          globalSceneRef.value,
          function () {
            globalSceneRef.value.createDefaultCamera(true, true, true);
          }
        );
      }

```

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [November 18, 2021, 7:00pm UTC](https://forum.babylonjs.com/t/load-upload-glb-file-in-scene-not-work/25405/2 "2021-11-18T19:00:04Z")

</div>

It is really hard to tell without a repro. Could you create one in the playground ?

---

<div class="post-metadata">

**Author:** ![Vortex](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vortex/32/26844_2.png) [@Vortex](https://forum.babylonjs.com/u/Vortex)\
**Post date:** [November 18, 2021, 7:10pm UTC](https://forum.babylonjs.com/t/load-upload-glb-file-in-scene-not-work/25405/3 "2021-11-18T19:10:30Z")

</div>

@rbrose,

Sebavan has a good point with the repro, though as a best practice if your loading from a model file you should use glTF and then do something like this for loading:

```auto
BABYLON.SceneLoader.Append("", "data":+gltfString, scene, ()=>{
    globalSceneRef.value.createDefaultCamera(true, true, true);
}, 0, 0, ".gltf");

```

where `gltfString` is the contents of our glTF file - this also allows us to do

```auto
new Blob([fileContents]).text().then(data=>{
    //SceneLoader Here
});

```

This might clear up your problems by using glTF. I also noticed that the error refers to `data:data:...` so maybe check their isn’t something like `"data:"+dataString` where `dataString` also has `data:`

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [December 17, 2021, 1:48pm UTC](https://forum.babylonjs.com/t/load-upload-glb-file-in-scene-not-work/25405/4 "2021-12-17T13:48:14Z")

</div>

Hi there @rbrose just checking in, were you able to load your model? If not, could you provide us with a playground repro so we can further help? 😄
