Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for GLB files #52611

Open
Sergiobop opened this issue Nov 16, 2023 · 0 comments
Open

Better support for GLB files #52611

Sergiobop opened this issue Nov 16, 2023 · 0 comments

Comments

@Sergiobop
Copy link

Sergiobop commented Nov 16, 2023

Symfony version(s) affected

All

Description

I'm trying to upload a valid .glb file, and there are some problems:

  • Using the method ->getMimeType() always returns 'application/octet-stream' instead of 'model/gltf-binary'
  • Using the method ->extension() always returns 'bin' instead of 'glb'

In the Mime types, i can find these keys in the map and the reverse map so it should work:

        'glb' => ['model/gltf-binary'],
        'gltf' => ['model/gltf+json'],

How to reproduce

Try to upload a valid GLB and use ->extension() method.

For example:
Duck.glb

BrainStem.glb

Additional Context

You can check the GLB files that i mention are valid here: GLTF VALIDATOR

Doing something like this:

$fileToUpload = $request->file('file');
dd($fileToUpload->extension(), $fileToUpload->getClientOriginalExtension());

Displays "bin", "glb"

@Sergiobop Sergiobop added the Bug label Nov 16, 2023
@Sergiobop Sergiobop changed the title Add support for application/gltf-buffer Better support for GLB files Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants