# Save glb export result in a File rather than download

**URL:** <https://forum.babylonjs.com/t/save-glb-export-result-in-a-file-rather-than-download/16711>\
**Category:** Questions\
**Created:** [December 17, 2020, 11:28am UTC](https://forum.babylonjs.com/t/save-glb-export-result-in-a-file-rather-than-download/16711 "2020-12-17T11:28:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shamsail](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/shamsail/32/12612_2.png) [@Shamsail](https://forum.babylonjs.com/u/Shamsail)\
**Post date:** [December 17, 2020, 11:28am UTC](https://forum.babylonjs.com/t/save-glb-export-result-in-a-file-rather-than-download/16711/1 "2020-12-17T11:28:05Z")

</div>

Hi, I have a question about saving the scene (not download the scene).

Currently, I’m using

```
GLTF2Export.GLBAsync(viewer.sceneManager.scene, "scene").then(
                (glb) => {
                  glb.downloadFiles();
                }
              );

```

I want to save the (glb) results into the file (not download it.)  
Like , I tried  
`var file = new File([glb], "filename.glb");`  
But , It’s giving me 15Bytes file size. You can say it’s not proper file that I’m looking for. Because , when I used `glb.downloads()` , It’s giving me 9.4MB file size.

Please help me in this regard.

---

<div class="post-metadata">

**Author:** ![taulmarill](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/taulmarill/32/12691_2.png) [@taulmarill](https://forum.babylonjs.com/u/taulmarill)\
**Post date:** [December 17, 2020, 11:35am UTC](https://forum.babylonjs.com/t/save-glb-export-result-in-a-file-rather-than-download/16711/2 "2020-12-17T11:35:30Z")

</div>

`glb` is an object that can contain multiple files, they’re located in `glb.glTFFiles`

---

<div class="post-metadata">

**Author:** ![Shamsail](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/shamsail/32/12612_2.png) [@Shamsail](https://forum.babylonjs.com/u/Shamsail)\
**Post date:** [December 17, 2020, 11:35am UTC](https://forum.babylonjs.com/t/save-glb-export-result-in-a-file-rather-than-download/16711/3 "2020-12-17T11:35:55Z")

</div>

Hi,  
I found a best solution for it  
`var file = new File([glb.glTFFiles["scene.glb"]], "export.glb");`  
Worked… heheheh

---

<div class="post-metadata">

**Author:** ![Shamsail](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/shamsail/32/12612_2.png) [@Shamsail](https://forum.babylonjs.com/u/Shamsail)\
**Post date:** [December 17, 2020, 11:37am UTC](https://forum.babylonjs.com/t/save-glb-export-result-in-a-file-rather-than-download/16711/4 "2020-12-17T11:37:00Z")

</div>

Thanks , I consoled it and found 😃

---

<div class="post-metadata">

**Author:** ![Anda\_Interaktif](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/anda_interaktif/32/11300_2.png) [@Anda\_Interaktif](https://forum.babylonjs.com/u/Anda_Interaktif)\
**Post date:** [January 3, 2023, 6:42am UTC](https://forum.babylonjs.com/t/save-glb-export-result-in-a-file-rather-than-download/16711/5 "2023-01-03T06:42:47Z")

</div>

> [@Shamsail](#):
>
> var file = new File([glb.glTFFiles[“scene.glb”]], “export.glb”);

is there any playground example ? i can’t make it worked.
