Update: 2026-05-09 13:10:07
This commit is contained in:
@@ -47,10 +47,10 @@ if ($batch['status'] !== 'uploading') {
|
||||
}
|
||||
|
||||
// 3. Validate file type
|
||||
$allowedTypes = ['image/jpeg', 'image/png', 'image/webp', 'image/heic', 'image/heif'];
|
||||
$allowedTypes = ['image/jpeg', 'image/png', 'image/webp', 'image/heic', 'image/heif', 'application/pdf'];
|
||||
$mimeType = $_FILES['image']['type'];
|
||||
if (!in_array($mimeType, $allowedTypes)) {
|
||||
json_error('نوع الملف غير مدعوم. المسموح: JPEG, PNG, WebP, HEIC', 422);
|
||||
json_error('نوع الملف غير مدعوم. المسموح: صور و PDF', 422);
|
||||
}
|
||||
|
||||
// 4. Validate file size (max 10MB)
|
||||
|
||||
Reference in New Issue
Block a user