Issues with 3d Viewer Plugin and .obj files

Hi everyone,

I have been working with the 3d Viewer Plugin, and I’m having different problems. I’m new both at grav and 3d models, so I’m pretty sure these are quite basic issues!

Mime type

The first thing is that I’m trying to import .obj files, and these do not seem to be recognized by the browser.
I have been adding an entry for .obj files in the Media admin page, testing various mime types (“model/obj” being the recommended one). However, when trying to import the .obj files with the media tool in the Page admin section, I’m receiving this error:

The mime type does not match to file extension

(I can, however, manually add the file in the page folder.)
Am I doing something wrong here? I have been testing various combinations of files and mime type configurations, to no success.

“Fetch failed” error

The second issue I’m having is when trying to save the page, when the page’s folder contains a .obj file. There’s a red popup, with this error:

Fetch Failed:
can't convert undefined to object

56299/fetchMedia/<@http://localhost/harmonie/grav-admin/user/plugins/admin/themes/grav/js/admin.min.js?8ef3c2ad3e:4325:16
56299/request/<@http://localhost/harmonie/grav-admin/user/plugins/admin/themes/grav/js/admin.min.js?8ef3c2ad3e:890:12

I gather this one seems to be related to my server configuration? (I’m working on localhost)

Textures on .obj files

Lastly, would anyone know if it is possible to display textures on .obj files with the plugin?

Many thanks for reading.
Cheers,

@PurpleRoom, Since this is a niche plugin, the chances that someone here will be able to help will be slim. You would be better of asking the developer.

Also, when having an issue, it can be worthwhile to consult the repo of the plugin and search the issues. The mime type issue has been asked before on the repo.

2 Likes

Thanks you, @anon76427325. I’ll ask him directly, and post the solution here for future reference. Cheers!