How do i access different media types?

I am trying to access a glft file, which is a 3d format

I have added this to the media.yaml config

    type: file
    thumb: media/thumb.png
    mime: application/json
    image: null

then added this to a template to access the file

{% set my_model1 =['Tripod Grip.gltf'] %}
{% set my_model2 = page.find('/images/3d-viewer').media['Tripod Grip.gltf'] %}

<text src="{{ my_model1 }}"></text>
<text src="{{ my_model2 }}"></text>

I have nominated two places to check if it makes a difference, but it returns src unknown.

i swapped the glft with searching for a png and it works so the code seems ok

is there anything else i need to do to enable grav to access different file types

@dean_007, Don’t know the file format gltf, but when Googling a bit, I found:

mime: model/gltf+json

Maybe that works?

i have just tried this but no change just comes back as empty / src unknown

ok stupid mistake, its a typo in the file ext :relaxed:

    type: gltf
    thumb: media/thumb.png
    mime: model/gltf+json
    image: null
{% set my_model1 =[page.header.model].url|e %} 
{% set my_model2 = page.find('/images/3dviewer').media[page.header.model].url|e %}

model 1 from page
model2 from images/3d viewer folder