fix: correctly detect glb & gltf mimetypes during upload (#12623)

### What?

The browser was incorrectly setting the mimetype for `.glb` and `.gltf`
files to `application/octet-stream` when uploading when they should be
receiving proper types consistent with `glb` and `gltf`.

This patch adds logic to infer the correct `MIME` type for `.glb` files
(`model/gltf-binary`) & `gltf` files (`model/gltf+json`) based on file
extension during multipart processing, ensuring consistent MIME type
detection regardless of browser behavior.

Fixes #12620
This commit is contained in:
Patrik
2025-06-02 14:26:26 -04:00
committed by GitHub
parent 08a6f88a4b
commit 05eeddba7c
6 changed files with 140 additions and 29 deletions

View File

@@ -25,3 +25,4 @@ export const withOnlyJPEGMetadataSlug = 'with-only-jpeg-meta-data'
export const customFileNameMediaSlug = 'custom-file-name-media'
export const listViewPreviewSlug = 'list-view-preview'
export const threeDimensionalSlug = 'three-dimensional'