Comments (3)
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".
from mime.
Setting mime.default_type = null
will return null when a type is not found.
Updated README.md in v1.2.10 (published)
from mime.
Agreed, default_type
should be undefined
by default.
from mime.
Related Issues (20)
- `.mov` vs `.qt` HOT 3
- Make `mime-db` a peer-dependency?
- mime.getType is undefine in typescript HOT 1
- Typescript bug in Next.js HOT 2
- application/javascript is deprecated HOT 1
- Use mime.getExtension() without `path` using Webpack 5 (via CRA v5) HOT 4
- New package exports error with v4.0.0 HOT 14
- `import {getType} from 'mime'` no longer works in `mime@4` HOT 1
- Error [ERR_REQUIRE_ESM]: require() of ES Module not supported. HOT 6
- `mime.getType('mp4')` gives me `'application/mp4'` rather than `'video/mp4'` HOT 1
- Skypack broken HOT 3
- Jest error HOT 4
- Cannot find module 'mime/lite' error after 4.0.1 upgrade HOT 1
- Version "4.0.1" doesn't include "CommonJS" exports that's crashing projects with "ERR_REQUIRE_ESM" error HOT 7
- ESM import trigger CJS errors in dependencies HOT 2
- TypeError: Cannot read private member from an object whose class did not declare it HOT 1
- A way to provide custom extension-mime type mappings HOT 1
- [Usage] How to distinguish between `Typescript` and `Transport Stream` HOT 1
- TS warnings while compiling with react-scripts HOT 4
- Error with implementation in NestJS project: Error [ERR_REQUIRE_ESM]: require() of ES Module (...) not supported HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mime.