src/Foundation/Uploads/Uploader.php
/**
     * Detects MIME Type based on file extension.
     *
     * @param string $extension
     *
     * @return string|null MIME Type or NULL if no extension detected
     */
Detects MIME Type based on file extension.
@param string $extension

@return string|null MIME Type or NULL if no extension detected
Detects MIME Type based on file extension . @param string $extension @return string|null MIME Type or NULL if no extension detected
public static function detectByFileExtension($extension)
    {
        static $extensionToMimeTypeMap;
        if (! $extensionToMimeTypeMap) {
            $extensionToMimeTypeMap = static::getExtensionToMimeTypeMap();
        }
        if (isset($extensionToMimeTypeMap[$extension])) {
            return $extensionToMimeTypeMap[$extension];
        }
        return 'text/plain';
    }
public static function detectByFileExtension ( $ extension ) { static $ extensionToMimeTypeMap ; if ( ! $ extensionToMimeTypeMap ) { $ extensionToMimeTypeMap = static :: getExtensionToMimeTypeMap ( ) ; } if ( isset ( $ extensionToMimeTypeMap [ $ extension ] ) ) { return $ extensionToMimeTypeMap [ $ extension ] ; } return 'text/plain' ; }
Detects MIME Type based on file extension.
Detects MIME Type based on file extension .