Permitir acesso ao upload sem auth
This commit is contained in:
1 parent
a1beb6a2e0
commit
b423438d6f
2 files changed
+13
No files matched your search
@@ -18,6 +18,12 @@ if (!is_dir($upload_dir)) {
|
||||
$allowed_types = ['image/jpeg', 'image/png', 'image/gif', 'application/pdf'];
|
||||
$max_file_size = 10 * 1024 * 1024; // 10MB
|
||||
|
||||
if (basename($_SERVER['PHP_SELF']) == 'upload.php') {
|
||||
// Ignorar autenticação para esta página
|
||||
} else {
|
||||
// ...código de autenticação existente...
|
||||
}
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if (isset($_FILES['files'])) {
|
||||
$files = $_FILES['files'];
|
||||
|
||||
Reference in new issue
Block a user