Start on fixing errors and semi-automatic setup

This commit is contained in:
Michał Gdula 2022-10-19 10:57:46 +00:00
parent d897215023
commit c3814000c0
10 changed files with 180 additions and 57 deletions

View file

@ -30,7 +30,12 @@ if (isset($_POST['submit'])) {
$tags = $make_stuff->tags(trim($_POST['tags']));
// Check filetype
$allowed_types = array('jpg', 'jpeg', 'png', 'webp');
if (isset($upload_conf['allowed_extentions'])) {
$allowed_types = $upload_conf['allowed_extentions'];
} else {
$allowed_types = array('jpg', 'jpeg', 'png', 'webp');
}
if (!in_array($file_type, $allowed_types)) {
?>
<script>