Use function to fetch all valid extensions

This commit is contained in:
Michael 2021-11-30 06:11:58 +00:00
parent 107cc6f297
commit 833b104c25

View 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 . ']'