Refactor file upload restrictions to limit accepted formats to JPG and PNG, and update maximum file size to 20MB
This commit is contained in:
parent
3a17a957cb
commit
8a7d726fd9
@ -93,7 +93,7 @@ include 'header.php';
|
||||
<div class="auth__field">
|
||||
<label for="file">Profilbild auswählen</label>
|
||||
<input type="file" name="uploadFile" id="file" accept="image/*" required>
|
||||
<p class="auth__hint">Erlaubt: JPG/PNG/WebP. Maximalgröße je nach Server.</p>
|
||||
<p class="auth__hint">Erlaubt: JPG/PNG. max. 20MB.</p>
|
||||
</div>
|
||||
|
||||
<div class="auth__actions">
|
||||
|
||||
@ -51,7 +51,6 @@ if ($tmp === '' || !is_uploaded_file($tmp))
|
||||
$allowedMimeToExt = [
|
||||
'image/jpeg' => 'jpg',
|
||||
'image/png' => 'png',
|
||||
'image/webp' => 'webp'
|
||||
];
|
||||
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user