X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FUtil%2FMimetype.php;h=d7a702d71c056a60ce1f89f7e4c56f0abafedf0e;hb=204e52ea307b182175ae0c64d6eb69c71a104658;hp=658c4bd06ef962655b6128196ae78649463a574d;hpb=a80705a8361a96a4c5a04bb29054da3b198dedf2;p=friendica.git diff --git a/src/Util/Mimetype.php b/src/Util/Mimetype.php index 658c4bd06e..d7a702d71c 100644 --- a/src/Util/Mimetype.php +++ b/src/Util/Mimetype.php @@ -1,7 +1,24 @@ . + * */ + namespace Friendica\Util; class Mimetype @@ -1071,14 +1088,13 @@ class Mimetype 'zsh' => 'text/x-script.zsh' ]; - $dot = strpos($filename, '.'); + $dot = strrpos($filename, '.'); if ($dot !== false) { $ext = strtolower(substr($filename, $dot + 1)); if (array_key_exists($ext, $mime_types)) { return $mime_types[$ext]; } - } else { - return 'application/octet-stream'; } + return 'application/octet-stream'; } }