Skip to content
Myr

Misc

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by visionmedia · committed by visionmedia · parent 92a43c5 · Browse files · 1 file+5 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−4 removed

  • other:+5 added−4 removed

1 file+5 added−4 removed

modified:lib/express.mime.js+5 added-4 removed
5 unmodified lines
6 Express.Mime = {7 name : 'mime',8 9 settings : {10 defaultMimeType : null10 defaultType : null11 },12 13 utilities : {14 15 /**16 * Returns the media type of _ext_, where _ext_17 * may be an extension ('jpeg') or a file path ('path/to/image.name.jpeg').16 * Returns the media type of _ext_, where _ext_ may be an17 * extension ('jpeg') or a file path ('path/to/image.name.jpeg'). 18 * Defaults to Express.settings.mime.defaultType or 'application/octet-stream'.19 *20 * @param {string} ext21 * @return {string}22 * @api public
2 unmodified lines
25 mime : function(ext) {26 if (ext.indexOf('.') != -1) 27 ext = ext.substring(ext.lastIndexOf('.') + 1, ext.length)28 return Express.utilities.mimeTypes[ext] || 28 Express.settings.mime.defaultMimeType ||29 Express.settings.mime.defaultType ||30 'application/octet-stream'31 },32 33 mimeTypes : {
170 unmodified lines