Update: 2026-05-09 13:10:07

This commit is contained in:
Hamza-Ayed
2026-05-09 13:10:07 +03:00
parent 9159e2d274
commit c0896468a7
2 changed files with 136 additions and 31 deletions

View File

@@ -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)