From 833b104c2534c09284ebb940c63aa1539193421e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Nov 2021 06:11:58 +0000 Subject: [PATCH] Use function to fetch all valid extensions --- include/api.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/api.php b/include/api.php index a982d4c7bc..3441f91158 100644 --- a/include/api.php +++ b/include/api.php @@ -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 . ']'