src/PutIO/Helpers/HTTP/HTTPHelper.php
protected function getMIMEType($file)
    {
        $mime = 'application/octet-stream';

        if (function_exists('finfo_open') && $info = @finfo_open(FILEINFO_MIME)) {
            if (($mime = @finfo_file($info, $file)) !== \false) {
                $mime = explode(';', $mime);
                $mime = trim($mime[0]);
            }
        }

        return $mime;
    }
protected function getMIMEType($file)
    {
        $mime = 'application/octet-stream';

        if (function_exists('finfo_open') && $info = @finfo_open(FILEINFO_MIME)) {
            if (($mime = @finfo_file($info, $file)) !== \false) {
                $mime = explode(';', $mime);
                $mime = trim($mime[0]);
            }
        }

        return $mime;
    }
protected function getMIMEType ( $ file ) { $ mime = 'application/octet-stream' ; if ( function_exists ( 'finfo_open' ) && $ info = @ finfo_open ( FILEINFO_MIME ) ) { if ( ( $ mime = @ finfo_file ( $ info , $ file ) ) !== \ false ) { $ mime = explode ( ';' , $ mime ) ; $ mime = trim ( $ mime [ 0 ] ) ; } } return $ mime ; }
Attempts to get the MIME type of a given file. Required for native file
uploads.

Relies on the file info extension, which is shipped with PHP 5.3
and enabled by default. So,... nothing should go wrong, RIGHT?

@param string $file    Path of the file you want to get the MIME type of.
@return string
Attempts to get the MIME type of a given file . Required for native file uploads .