vendure-ecommerce / vendure

The commerce platform with customization in its DNA.
https://www.vendure.io
MIT License
5.41k stars 952 forks source link

`mime-type` set to `application/octet-stream` when uploading `.glb` files #2844

Open dim-anis opened 1 month ago

dim-anis commented 1 month ago

Describe the bug Attempting to upload a .glb file results in an error. mime-type defaults to application/octet-stream instead of model/gltf-binary.

To Reproduce Steps to reproduce the behavior:

  1. Extend assetOptions.permittedFileTypes with model/gltf-binary or .glb
  2. Upload a .glb file through admin client
  3. Errors with "mime-type application/octet-stream is not allowed"

Expected behavior mime-type should be set to model/gltf-binary.

Environment (please complete the following information):

michaelbromley commented 1 month ago

Hi,

Are you able to provide a sample .glb file I can use for testing?

dim-anis commented 1 month ago

Sure, @michaelbromley! Github doesn't support attaching .glb files, so here is a link to gdrive.

https://drive.google.com/file/d/1Q904UoC-MsH1UiQ2QdddNjOsjFel1bXk/view?usp=sharing

michaelbromley commented 3 weeks ago

Thanks. I can reproduce this using the provided file.

I think this may be a current limitation of browsers, according to:

I think for now you may need to accept application/octet-stream for this to work