[SOLVED] Cannot load GLB asset from a URL

Hi, Guys I am trying to load a glb file
using Ajax GET call, I get the file in binary format, then I am converting to blob and a url.
But I am getting this error:

Invalid length found in glb header. Found 3183472468


I have to load the glb file in this specific manner because I have to do a Ajax call with the authentication header then I get the file (in the main project) in this binary format.

Hi @Saad_Haider,

Not sure, but I think the issue here is that your initial Ajax request is returning text not binary.

You need to configure the jQuery ajax request to have the response type as binary or arraybuffer.


Thanks @Leonidas

Issue has been resolved, it was indeed the response type issue.

1 Like