Hi there, I have a model that I want to export to be abled to display on a dashboard. The issue is that after exporting the model when I am sending the model as a blob to the flask server the downloaded .glb file has a size of 15 bytes and the content of the file is:
[object Object]
Here’s my code through which I am exporting my model:
The code above looks reasonable to me, I would check the result.byteLength property to make sure it’s the size you expect before the upload, and perhaps also check your browser’s Network tab in dev tools to see that the POST request has the expected size.
If both of those look good, it might be something on the server side. If not, that might help narrow things down.
I’ve had this issue before in a previous migration and it made sense that if an {object} is passed in rather than a (function) the options object is simply not recognised as it should be the 4th parameter in the arguments list, as can be seen here…
To add to this, writer.writeAsync requires the options object as seen here…
Eg… If options is not the 4th argument it is not recognised by 'writer.writeAsync`…
Okay I also added the error function callback as well as set binary to true, but still the .glb I am receiving from the response is same.
It’s not even binary, just some plain text.
Should I make a live share VSCode window with the backend and an example scene to mess around with, through which you can also see what the issue actually is?
Here is what works for me, try to ignore variables that might have been declared earlier in the code and the functions that handle errors and complete the export: