Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Nick 70 posts 385 karma points
    May 09, 2023 @ 05:21

    Rendering GLB (3D Animations) files within Umbraco


    Hope somebody could help me with a strange issue within my Umbraco 11 Cloud project, I'm using a Media picker to load a GLB file, which is a 3D rendered interactive model like this, but I'm receiving a 404 error on the glb file. Has anybody used these files within Umbraco and can help me resolve this issue?

    <model-viewer src="@(Model.Value<IPublishedContent>("video3DLink").Url())"
                  ar-modes="webxr scene-viewer quick-look"
                  style="width: 100%; top: 0px; position: sticky"

    And this renders out on the page as

    enter image description here

    Many thanks again for all your support

  • Jan Skovgaard 11279 posts 23675 karma points MVP 9x admin c-trib
    May 09, 2023 @ 07:48
    Jan Skovgaard

    Hi Nick

    My suspicion about this issue is that the server does not know the correct MIME type for the glb file.

    So what I have been able to find out is that the mime type appears to be model/gltf-binary

    But I must admit that since we made the switch to .NET 5+ going from web.config til appsettings.json I'm not sure how to register new mime types.

    Before it was usually a matter of doing the following in a web.config

                <remove fileExtension=".glb" />
                <mimeMap fileExtension=".glb" mimeType="model/gltf-binary" />

    But I'm not quite sure on how to achieve it these days - Not sure if you can actually still use a web.config with the above in it since it should be picked up by the server assuming it's running on IIS - But since you're running cloud I guess it could perhaps work.

    I don't know if there is a more "correct" way of doing it these days.

    Hope this guides you in the right direction.


  • Nick 70 posts 385 karma points
    19 days ago

    Thanks Jan,

    I've implemented that within the web.config but no joy. Also contacted Umbraco support, very helpful and supplied this possible solution:

    I talked with the developers when it's Net.Core You will need to do something like this I know its for another file format but its setup should be similar Seems like they can just configure it

    I just added it by calling services.ConfigureOptions

    public class MyStaticFileOptions : IConfigureOptions<StaticFileOptions>
    public void Configure(StaticFileOptions options)
    var provider = new FileExtensionContentTypeProvider();
    provider.Mappings[".geojson"] = "application/json";
    options.ContentTypeProvider = provider;


    Unfortunately this also didn't work for me, no errors but no file rendered either :-(

  • Harikrishna Parmar 43 posts 262 karma points c-trib
    1 week ago
    Harikrishna Parmar
    provider.Mappings.Add(".glb", "model/gltf-binary");
    provider.Mappings.Add(".gltf", "model/gltf+json");

    This would work. I have checked. it's working fine.

Please Sign in or register to post replies

Write your reply to: