]> git.mxchange.org Git - friendica.git/commitdiff
Use function to fetch all valid extensions
authorMichael <heluecht@pirati.ca>
Tue, 30 Nov 2021 06:11:58 +0000 (06:11 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 30 Nov 2021 06:11:58 +0000 (06:11 +0000)
include/api.php

index a982d4c7bc85df72983acba2b3347c2fd4b65f87..3441f91158fa110eaf6e4d8c0756eeff4050d721 100644 (file)
@@ -431,11 +431,7 @@ function post_photo_item($hash, $allow_cid, $deny_cid, $allow_gid, $deny_gid, $f
        $arr['visible']       = $visibility;
        $arr['origin']        = 1;
 
-       $typetoext = [
-                       'image/jpeg' => 'jpg',
-                       'image/png' => 'png',
-                       'image/gif' => 'gif'
-                       ];
+       $typetoext = Images::supportedTypes();
 
        // adds link to the thumbnail scale photo
        $arr['body'] = '[url=' . DI::baseUrl() . '/photos/' . $owner_record['nick'] . '/image/' . $hash . ']'