mirror of https://github.com/itflow-org/itflow
Only accept jpg, jpeg and png for company logo
This commit is contained in:
parent
5f4356546f
commit
20c87044b9
|
|
@ -48,7 +48,7 @@ $company_initials = nullable_htmlentities(initials($company_name));
|
|||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<input type="file" class="form-control-file" name="file">
|
||||
<input type="file" class="form-control-file" name="file" accept=".jpg, .jpeg, .png">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ if (isset($_POST['add_company_settings'])) {
|
|||
$new_file_name = md5(time() . $file_name) . '.' . $file_extension;
|
||||
|
||||
// check if file has one of the following extensions
|
||||
$allowed_file_extensions = array('jpg', 'gif', 'png');
|
||||
$allowed_file_extensions = array('jpg', 'jpeg', 'png');
|
||||
|
||||
if (in_array($file_extension,$allowed_file_extensions) === false) {
|
||||
$file_error = 1;
|
||||
|
|
@ -975,7 +975,7 @@ if (isset($_POST['add_telemetry'])) {
|
|||
|
||||
<div class="form-group">
|
||||
<label>Logo</label>
|
||||
<input type="file" class="form-control-file" name="file">
|
||||
<input type="file" class="form-control-file" name="file" accept=".jpg, .jpeg, .png">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
|
|
|||
Loading…
Reference in New Issue