Error loading .babylon

Hello! I still have bad English and BabylonJS. But I still study. Passing the basic lessons. And now I’m trying to download files from the blender. This is a standard cube (cube.babylon). But in the debugger of the browser he writes this error

Parse Error XML: incorrectly
Address: http://127.0.0.1/mesh/cube.babylon?1550853405308
Line 1, character 1:

What am I doing wrong?

Can you make sure that your webserver is set up to serve .babylon file MIME type?

MIME type? :open_mouth: First time I heard about it. Went to read in Google. ))) If it’s not difficult for you, tell me which extensions to include? Or give direction where to dig. Maybe I’ll find out myself, but I doubt it. I have Ubuntu and a web server Apache. And maybe this information needs to be added to the lessons? Or did I not see her?

MIME define the types (file extensions) allowed to be served by a web server.
I’m not used to apache but this seems a good start:
https://www.developershome.com/wap/wapServerSetup/tutorial.asp?page=settingUpMIME

C:\Windows\System32\inetsrv\config\applicationHost.config, line 455+

<mimeMap fileExtension=".zip" mimeType="application/x-zip-compressed" />
        <mimeMap fileExtension=".json" mimeType="application/x-javascript" />
        <mimeMap fileExtension=".webm" mimeType="video/webm" />
        <mimeMap fileExtension=".obj" mimeType="application/octet-stream" />
        <mimeMap fileExtension=".gltf" mimeType="application/octet-stream" />
		<mimeMap fileExtension=".glb" mimeType="application/octet-stream" />
        <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
        <mimeMap fileExtension=".babylon" mimeType="application/babylon" />
        <mimeMap fileExtension=".babylonmeshdata" mimeType="application/babylonmeshdata" />
        <mimeMap fileExtension=".babylonbinarymeshdata" mimeType="application/babylonbinarymeshdata" />

Thanks, Deltakosh and xiao_hu. It turns out the problem was on my part. I forgot to load the scene assetsManager.load (); :smile:. And yes, the Apache defaults mime types by default.

2 Likes