Load file from URL that doesn't contain file name (Firebase project)

Hi guys. I have somewhat weird problem. I am working on the Babylon project, and I am using Firebase platform.

I need to load a file from the link like bellow. But If I use this link Babylon loader doesn’t know what to load. Even if you go to this link you will get file without extension. So of course, I created a server, I get this URL and write the file with the proper name and extension and then I can use that newly written file to load into Babylon. Which is great. Idea was that whatever the URL is, I create temporary file, load it, edit it, save data into database and delete the file.

But the problem is that Firebase sets whole project as a read-only. And I cannot write files there. So this whole idea doesn’t work.

Is there any other idea how this could be done? Is there a way to somehow store data on the server and send it to client (like Blob, base64, some streams or whatever, I am not very familiar with this stuff)


Thank you

Also I need to add… I am using assetManager, and that’s how I am loading the file (I can change the approach tho). But as I understand when getting the file Babylon loading functions are creating xmlhttprequest. Is there a way to set headers for this request, or I need to create my own request to make that work.

When loading an assets you can set the plugin extension to load it, for example:


In your case, the issue is that the .obj file has fixed URLs for the .mtl and the texture assets (as you can see in the example). If you use .glb (for example) you can get everything included in one single file, and then there is no reason it won’t work.

Plugin extension enabled me to load these links directly now. That solves my problem for now. Thank you so much for your answer.

1 Like