code: function detectMimeType() {
    var extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  
    extension = extension.toString().toLowerCase().replace(/\s/g, '').replace(/^\./g, '');
  
    if (!(extension in _listExtensions.extensions)) {
      return 'application/octet-stream';
    }
  
    if (typeof _listExtensions.extensions[extension] === 'string') {
      return _listExtensions.extensions[extension];
    }
  
    // search for name match
    for (var i = 0, len = _listExtensions.extensions[extension].length; i < len; i++) {
      var mimePart = _listExtensions.extensions[extension][i].split('/')[1];
      if (mimePart === extension) {
        return _listExtensions.extensions[extension][i];
      }
    }
  
    // use the first one
    return _listExtensions.extensions[extension][0];
  }
docs: Returns content type for a file extension. If no suitable content types
  are found, 'application/octet-stream' is used as the default content type
  
  @param {String} extension Extension to be checked for
  @return {String} File extension