[SOLVED] OBJ Upload from Server

Hi everyone, I have a project that I Forked @will which loaded an .obj from a server.

I am putting my hosted .obj on my server. I have everything exactly the same but my object does not load me.
Could you orient me what may be happening?

I leave you my project so you can see it. https://playcanvas.com/editor/scene/1074649

@will I saw that in your server link if I look for it in the browser this comes out link_Server_Will If you test my server address it comes out similar to yours.

I await your response and thank you very much in advance.
.
or if someone knows what may be happening, and can help me, I would appreciate it

Hi @RafaelLopera,

There is a CORS error in the console, your server is missing a setting to be able to serve remote resources to cross domain requests.

If I override that error in my browser using an extension for that the model loads correctly:

Check the following thread, it contains useful info on how to configure your server to enable that:

[SOLVED] Reading an OBJ file from a remote website

1 Like

@Leonidas but what exactly do you cancel? I don’t understand what the CORS is

That is something to do on your backend or ask your hosting provider to take care of. Check the following site for more info on what CORS and how to configure a server to enable it:

https://enable-cors.org/

@Leonidas
What I can’t know is how you have managed to visualize it, I really don’t know what it has deleted or how it has given permissions, the truth is that I have no idea about CORS.
I’m looking at the link that happened to me but I can’t find how to enable to see the 3d

I’ve this extension installed and enabled in Chrome, and that bypassed the CORS error and rendered the model:

That is only for your browser, to properly solve this error if you aren’t able to do this yourself contact your server admin or hosting provider.

Click here to toggle the extension on:

@yaustar @Leonidas
Ok, thanks, I can see it, the problem is that other users that I gave you the project link do not get to preview it, it is because of the CORS from the server that you have to correct, right?

Yes. Basically the server where you are hosting the file doesn’t allow/not configured for the files to be accessed from a different domain.

2 Likes

perfect, because thank you very much for all the help received.