Skip to content

Commit

Permalink
Set permissions for image uploads (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
markspolakovs committed Feb 7, 2024
1 parent 1976b7b commit af9927b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Classes/ServiceAPI/MyRadio_Show.php
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,8 @@ public function setShowPhoto($tmp_path)
$filetype = explode('/', getimagesize($tmp_path)['mime'])[1];
$suffix = 'image_meta/ShowImageMetadata/'.$result.'.'.$filetype;
$path = Config::$public_media_path.'/'.$suffix;
rename($tmp_path, $path);
move_uploaded_file($tmp_path, $path);
chmod($path, 0644);

self::$db->query(
'UPDATE schedule.show_image_metadata SET effective_to=NOW()
Expand Down

0 comments on commit af9927b

Please sign in to comment.