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

README should state upfront that "application/octet-stream" is default for unknown extension #55

Closed
ghost opened this issue Feb 25, 2013 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 25, 2013

When I looked at the doco, one of the first things I thought was what happened if you put in an unknown file extension.

In this case, I noticed it returns "application/octet-stream".

It'll be good to put that upfront in the README because I'm sure this is one of the first things people think about.

What do you think?

BTW, thanks for such a useful package!

Chris

@tyler-johnson
Copy link

Honestly, I think it should default to null or undefined when it can't find the extension. When a "application/octet-stream" comes up, I don't actually know if it wan't found, it could actually be "application/octet-stream".

@broofa
Copy link
Owner

broofa commented Jul 25, 2013

Setting mime.default_type = null will return null when a type is not found.

Updated README.md in v1.2.10 (published)

@broofa broofa closed this as completed Jul 25, 2013
@stevenvachon
Copy link

Agreed, default_type should be undefined by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants