• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/typefile.php
  • Класс: BitrixDiskTypeFile
  • Вызов: TypeFile::getMimeTypeExtensionList
static function getMimeTypeExtensionList()
{
	static $mimeTypeList = array(
		// IMAGE
		'gif' => 'image/gif',
		'jpg' => 'image/jpeg',
		'jpeg' => 'image/jpeg',
		'bmp' => 'image/bmp',
		'png' =>'image/png',
		'webp' =>'image/webp',
		'tif' => 'image/tiff',
		'tiff' => 'image/tiff',
		'psd' => 'image/vnd.adobe.photoshop',
		// VECTOR IMAGE
		'svg' => 'image/svg+xml',
		'svgz' => 'image/svg+xml',
		'cdr' => 'image/vnd.coreldraw',
		'swf' => 'application/x-shockwave-flash',
		'eps' => 'application/postscript',
		'ps' => 'application/postscript',
		'ai' => 'application/postscript',
		'sketch' => 'application/octet-stream',

		// DOCUMENT
		'html' => 'text/html',
		'htm' => 'text/html',
		'txt' => 'text/plain',
		'xml' => 'application/xml',
		'pdf' => 'application/pdf',
		'doc' => 'application/msword',
		'xls' => 'application/vnd.ms-excel',
		'ppt' => 'application/vnd.ms-powerpoint',
		'vsd' => 'application/vnd.ms-visio',
		'vsdx' => 'application/vnd.ms-visio.drawing',
		'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
		'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
		'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
		'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
		'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
		'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
		'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
		'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
		'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
		'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
		'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
		'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
		'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
		'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
		'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
		'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
		'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
		'rtf' => 'application/msword',
		'csv' => 'application/vnd.ms-excel',
		'fb2' => 'application/xml',
		'djvu' => 'image/vnd.djvu',
		'epub' => 'application/epub+zip',
		'msg' => 'message/rfc822',
		'eml' => 'message/rfc822',
		'odt' => 'application/vnd.oasis.opendocument.text',

		// ARCHIVE
		'rar' => 'application/x-rar-compressed',
		'zip' => 'application/zip',
		'tgz' => 'application/x-gzip',
		'gz' => 'application/x-gzip',
		'7z' => 'application/x-7z-compressed',
		'tar' => 'application/x-tar',
		'bz2' => 'application/x-bzip2',

		// VIDEO
		'mp4' => 'video/mp4',
		'mp4v' => 'video/mp4',
		'mpg4' => 'video/mp4',
		'webm' => 'video/webm',
		'ogv' => 'video/ogg',
		'3gp' => 'video/3gpp',
		'mov' => 'video/quicktime',
		'flv' => 'video/x-flv',
		'avi' => 'video/x-msvideo',
		'mkv' => 'video/x-matroska',
		'm4v' => 'video/x-m4v',
		'h264' => 'video/h264',
		'wmv' => 'video/x-ms-wmv',

		// AUDIO
		'mp3' => 'audio/mpeg',
		'wav' => 'audio/wav',

		// SCRIPT
		'php' => 'text/php',
		'js' => 'text/javascript',
		'css' => 'text/css',
		'sql' => 'text/plain',
		'pl' => 'text/plain',
		'sh' => 'text/plain',

		// FONTS
		'ttf' => 'application/x-font-ttf',
		'otf' => 'application/vnd.ms-opentype',
		'eot' => 'application/vnd.ms-fontobject',
		'woff' => 'application/font-woff',
		'pfa' => 'application/x-font-type1',
	);

	return $mimeTypeList;
}