public function getMimeType($path, $default = "application/octet-stream")
    {

        $finfo = finfo_open(FILEINFO_MIME_TYPE); // return mime type ala mimetype extension
        $fmtype = finfo_file($finfo, $path);

        finfo_close($finfo);

        return !empty($fmtype) ? $fmtype : $default;
    }