Only accept jpg, jpeg and png for company logo

This commit is contained in:
johnnyq
2024-11-16 15:09:38 -05:00
parent 5f4356546f
commit 20c87044b9
3 changed files with 4 additions and 5 deletions

View File

@@ -20,10 +20,9 @@ if (isset($_POST['edit_company'])) {
// Check to see if a file is attached
if ($_FILES['file']['tmp_name'] != '') {
if ($new_file_name = checkFileUpload($_FILES['file'], array('jpg', 'jpeg', 'gif', 'png'))) {
if ($new_file_name = checkFileUpload($_FILES['file'], array('jpg', 'jpeg', 'png'))) {
$file_tmp_path = $_FILES['file']['tmp_name'];
// directory in which the uploaded file will be moved
$upload_file_dir = "uploads/settings/";
$dest_path = $upload_file_dir . $new_file_name;