|
|
|
@ -86,30 +86,23 @@ class File
@@ -86,30 +86,23 @@ class File
|
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->_connection->setMime( |
|
|
|
|
strval( |
|
|
|
|
mime_content_type( |
|
|
|
|
// Detect MIME type |
|
|
|
|
switch (true) |
|
|
|
|
{ |
|
|
|
|
case $mime = Filesystem::getMimeByPath( |
|
|
|
|
$address->getPath() |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
): break; |
|
|
|
|
|
|
|
|
|
if (Filesystem::MIME_TEXT_PLAIN == $this->_connection->getMime()) |
|
|
|
|
{ |
|
|
|
|
$extension = pathinfo( |
|
|
|
|
strval( |
|
|
|
|
case $mime = mime_content_type( |
|
|
|
|
$address->getPath() |
|
|
|
|
), |
|
|
|
|
PATHINFO_EXTENSION |
|
|
|
|
); |
|
|
|
|
): break; |
|
|
|
|
|
|
|
|
|
default: $mime = Filesystem::MIME_TEXT_GEMINI; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (in_array($extension, ['gmi', 'gemini'])) |
|
|
|
|
{ |
|
|
|
|
$this->_connection->setMime( |
|
|
|
|
Filesystem::MIME_TEXT_GEMINI |
|
|
|
|
$mime |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|