Unable to upload 3d model from S3 bucket

I’m trying to upload a GLB model from my S3 bucket. The URL is publicly accessible and I can download the file fine from it. Shopify rejects it as an ‘Invalid Model 3d url’. Any thoughts?

Thanks!

Curl command:

$ curl -X POST "https://info-20201.myshopify.com/admin/api/2024-01/graphql.json" \
>   -H "Content-Type: application/json" \
>   -H "X-Shopify-Access-Token: <redacted>" \
>   -d '{
>     "query": "mutation productCreateMedia($productId: ID!, $media: [CreateMediaInput!]!) { productCreateMedia(productId: $productId, media: $media) { media { mediaContentType ... on Model3d { sources { url } } } userErrors { field message } } }",
>     "variables": {
>       "productId": "gid://shopify/Product/<redacted>",
>       "media": [{
>          "originalSource": "https://coxphoto.s3.eu-north-1.amazonaws.com/ANT-015-Canvas-XL.glb",
>          "mediaContentType": "MODEL_3D"
>       }]
>     }
>   }'

Output:

{"data":{"productCreateMedia":{"media":[],"userErrors":[{"field":["media","0","originalSource"],"message":"Invalid Model 3d url=https://coxphoto.s3.eu-north-1.amazonaws.com/ANT-015-Canvas-XL.glb"}]}},"extensions":{"cost":{"requestedQueryCost":21,"actualQueryCost":20,"throttleStatus":{"maximumAvailable":2000.0,"currentlyAvailable":1980,"restoreRate":100.0}}}}     

You can’t provide a url directly for anything other than images. For the others you have to stage your media.

This guide has more info Manage media for products