public static function fileMime(string $filename, array $detalles = []) {
        if (isset($detalles['path'])) {
            $path = str_start(str_replace("\\", "/", $filename), str_finish(str_replace("\\", "/", $detalles['path']), '/'));
        } else {
            $path = $filename;
        }
        $ext = pathinfo($path, PATHINFO_EXTENSION);
        if (file_exists($path)) {
            $typesArray = config("sirgrimorum.mimebyext", []);
            $mimeType = "";
            if (!count($typesArray) == 0) {
                if (isset($typesArray[$ext])) {
                    $mimeType = $typesArray[$ext];
                }
            }
            $otro = $mimeType;
            if ($mimeType == "") {
                $finfo = finfo_open(FILEINFO_MIME_TYPE);
                $mimeType = finfo_file($finfo, public_path($path));
            }
            return $mimeType;
        } else {
            return false;
        }
    }