draco icon indicating copy to clipboard operation
draco copied to clipboard

Standard MIME type for a Draco File?

Open william-silversmith opened this issue 2 years ago • 6 comments

Hi,

I was wondering what the right way to designate a file as draco compressed on cloud storage. Would that be Content-Encoding: draco with Content-Type: model/mesh or would it be something more like Content-Type: model/mesh+draco? I've seen one website recommend Content-Type: application/x.draco but that seems too informal for a relatively popular encoding type.

EDIT: Did some reading here: https://github.com/KhronosGroup/glTF/issues/412 Seems model/mesh+draco would probably not be allowed. At least model/x.draco would be an improvement over application/x.draco.

Thanks!

william-silversmith avatar Oct 29 '21 04:10 william-silversmith

Hi @william-silversmith,

Are you talking about putting Draco in a glTF file?

FrankGalligan avatar Apr 25 '22 16:04 FrankGalligan

Hi Frank,

No I was just uploading a bunch of them to Google Cloud Storage and thought it would be good to label them accurately as the file specification didn't allow file extensions. It might help someone decode them someday even if other infrastructure is missing.

On Mon, Apr 25, 2022, 12:29 PM FrankGalligan @.***> wrote:

Hi @william-silversmith https://github.com/william-silversmith,

Are you talking about putting Draco in a glTF file?

— Reply to this email directly, view it on GitHub https://github.com/google/draco/issues/761#issuecomment-1108788939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATGQSLJWQ6WN5PMLSFIRG3VG3B4TANCNFSM5G6N2JAQ . You are receiving this because you were mentioned.Message ID: @.***>

william-silversmith avatar Apr 25 '22 16:04 william-silversmith

@william-silversmith So you uploaded .drc files? Or glTF files encoded with Draco?

FrankGalligan avatar Apr 25 '22 20:04 FrankGalligan

These were files encoded using https://github.com/seung-lab/DracoPy, which is a wrapper around the C++ draco codec. I believe that means they are .drc files though there is no .drc extension.

william-silversmith avatar Apr 25 '22 20:04 william-silversmith

OK thanks. Yeah it looks like DracoPy is just creating Draco compressed files. I.e. .drc files, not glTF Draco files.

We can look into registering the mimetype, especially if more people are creating Draco compressed files. Though I think the server will need them to be named "*.drc" in order for the server to send the correct mime type in the future.

FrankGalligan avatar Apr 27 '22 16:04 FrankGalligan

Thanks Frank! Fwiw, I manually set the "Content-Type" field so the filename extension will have no impact on that.

william-silversmith avatar Apr 27 '22 20:04 william-silversmith