# The.STL model cannot be displayed after being obtained from the cloud server

**URL:** <https://forum.babylonjs.com/t/the-stl-model-cannot-be-displayed-after-being-obtained-from-the-cloud-server/44440>\
**Category:** Questions\
**Created:** [September 25, 2023, 7:21am UTC](https://forum.babylonjs.com/t/the-stl-model-cannot-be-displayed-after-being-obtained-from-the-cloud-server/44440 "2023-09-25T07:21:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![haoxl3](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/haoxl3/32/35050_2.png) [@haoxl3](https://forum.babylonjs.com/u/haoxl3)\
**Post date:** [September 25, 2023, 7:21am UTC](https://forum.babylonjs.com/t/the-stl-model-cannot-be-displayed-after-being-obtained-from-the-cloud-server/44440/1 "2023-09-25T07:21:40Z")

</div>

I requested that the babylonjs sample.stL file display properly in the browser. When I put the.stl file on my own cloud server and sent the request, the task content was not displayed on the page, and the browser console reported an error.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/1/a1560948598d9c46709d80ca07a8d4b756220620.png)

I find that the response headers are the same, and the response also returns the content. Why does the error occur?

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/c/d/cd78521644bb03f3e2eff1c540b850ddab19c1d6.png)

my code:

> The same code works fine when I request [https://models.babylonjs.com/Channel9/Channel9.stl](https://models.babylonjs.com/Channel9/Channel9.stl)

```auto
BABYLON.SceneLoader.ImportMeshAsync(
    '',
    'http://localhost:8906/api/bamboo/api-common/upload/download-file?obsPath=obs://dev/test/',
    'Channel9.stl',
    scene.current,
    (sceneArg) => {
        setLoading(false);
        debugger
        const boundingInfo = sceneArg[0].getBoundingInfo();
        console.log('boundingInfo====', boundingInfo);
        const ratio = 9.0 / boundingInfo.boundingSphere.radius;

        sceneArg[0].position.y = (0 - boundingInfo.minimum.y) * ratio;
        sceneArg[0].scaling.x = ratio;
        sceneArg[0].scaling.y = ratio;
        sceneArg[0].scaling.z = ratio;
        // camera.setTarget(sceneArg[1]);
    }
);

```

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [September 25, 2023, 9:57am UTC](https://forum.babylonjs.com/t/the-stl-model-cannot-be-displayed-after-being-obtained-from-the-cloud-server/44440/2 "2023-09-25T09:57:07Z")

</div>

Are you sure the “content-disposition” header is the same in both cases?

What if you request directly the .stl file without passing by the intermediate `download-file` page?

---

<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:** [September 25, 2023, 5:46pm UTC](https://forum.babylonjs.com/t/the-stl-model-cannot-be-displayed-after-being-obtained-from-the-cloud-server/44440/3 "2023-09-25T17:46:09Z")

</div>

Can you share a repro ?

---

<div class="post-metadata">

**Author:** ![haoxl3](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/haoxl3/32/35050_2.png) [@haoxl3](https://forum.babylonjs.com/u/haoxl3)\
**Post date:** [September 26, 2023, 3:05am UTC](https://forum.babylonjs.com/t/the-stl-model-cannot-be-displayed-after-being-obtained-from-the-cloud-server/44440/5 "2023-09-26T03:05:59Z")

</div>

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/8/4/84127b1aa99c34509e8528cf7939966c11fd8cfc.jpeg)  
content-disposition is not the same. This interface is written uniformly, and the back-end programmer may not help me modify it.  
I finally gave up using babylon and used three.js to load .stl files.

---

<div class="post-metadata">

**Author:** ![haoxl3](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/haoxl3/32/35050_2.png) [@haoxl3](https://forum.babylonjs.com/u/haoxl3)\
**Post date:** [September 26, 2023, 3:06am UTC](https://forum.babylonjs.com/t/the-stl-model-cannot-be-displayed-after-being-obtained-from-the-cloud-server/44440/6 "2023-09-26T03:06:44Z")

</div>

Sorry, it involves security issues, which I can’t provide at the moment
