We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2b3981b + 24ce0cd commit 4469721Copy full SHA for 4469721
1 file changed
system/Files/File.php
@@ -134,6 +134,11 @@ public function guessExtension(): ?string
134
*/
135
public function getMimeType(): string
136
{
137
+ if (! function_exists('finfo_open'))
138
+ {
139
+ return $this->originalMimeType ?? 'application/octet-stream';
140
+ }
141
+
142
$finfo = finfo_open(FILEINFO_MIME_TYPE);
143
$mimeType = finfo_file($finfo, $this->getRealPath());
144
finfo_close($finfo);
0 commit comments