diff --git a/src/utils/media-utils.js b/src/utils/media-utils.js index a9e3a5799fc090d728cf6875546b49b235a651b3..1c72a0fb18fa59bb87cb3763797f6c09377e8af7 100644 --- a/src/utils/media-utils.js +++ b/src/utils/media-utils.js @@ -28,7 +28,7 @@ const staticContentMappings = { "poly.googleapis.com": "model/gltf" }; const fetchContentType = async url => { - const staticContentType = staticContentMappings[new URL(decodeFarsparkUrl(url)).hostname]; + const staticContentType = staticContentMappings[new URL(isFarsparkUrl(url) ? decodeFarsparkUrl(url) : url).hostname]; return staticContentType ? Promise.resolve(staticContentType) : fetch(url, { method: "HEAD" }).then(r => r.headers.get("content-type"));