Giter Club home page Giter Club logo

Comments (14)

jonathanong avatar jonathanong commented on August 23, 2024

how that different than mime.contentType('zip')? we can strip the +

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

lol, I didn't realize they just corresponded to the common file extensions. They technically are registered separately, but yea, I see your point ;0

from mime-types.

Fishrock123 avatar Fishrock123 commented on August 23, 2024

Do we still need this or?

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

Up to you guys. Those three examples have a suffix that match a file extension, but that does not have to be the case.

from mime-types.

Fishrock123 avatar Fishrock123 commented on August 23, 2024

Found in the mime.json: "application/vnd.wv.csp+wbxml" .... what? How are we supposed to know what that is anyways?

Also: "audio/amr-wb+" .. what even... Is this even a valid type?!??

"model/x3d+binary" ... hmm.

"model/x3d+vrml" .. yeah uh, idk how we'd be able to tell what these things are any better than just checking them as a file extension.

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

The IANA has a list of them somewhere.

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

http://www.iana.org/assignments/media-type-structured-suffix/media-type-structured-suffix.xhtml

from mime-types.

jonathanong avatar jonathanong commented on August 23, 2024

@dougwilson what's your plan on this?

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

This seems like something to put in mime-db, no? db['application/json'].suffix === 'json'. Then mime-types can implement the reverse, just like it does for file extensions.

from mime-types.

Fishrock123 avatar Fishrock123 commented on August 23, 2024

application/json's suffex is not json...

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

application/json's suffex is not json...

Huh? Are you following along in the conversation :)? Just check it out in the link I gave above.

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

It's also spelled "suffix" from the RFC and the IANA website :)

from mime-types.

jonathanong avatar jonathanong commented on August 23, 2024

hmmm don't see a suffix -> mime type mapping. not sure what the easiest way to do this is

from mime-types.

dougwilson avatar dougwilson commented on August 23, 2024

I'm closing this for some other time in the future for some use, rather than keeping a never-ending issue open :)

from mime-types.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.