Update Saqel Platform: 2026-09-08 18:26:41
This commit is contained in:
@@ -39,6 +39,17 @@ class VideoController
|
||||
VideoService::ensureSchema();
|
||||
CurriculumService::ensureSchema();
|
||||
|
||||
// PHP discards both multipart fields and files when post_max_size is
|
||||
// exceeded. Detect that case before reporting a misleading missing title.
|
||||
$contentLength = (int)($_SERVER['CONTENT_LENGTH'] ?? 0);
|
||||
if ($contentLength > 0 && empty($_POST) && empty($_FILES)) {
|
||||
$response->status(413)->json([
|
||||
'status' => 'error',
|
||||
'message' => 'حجم الفيديو تجاوز حد الرفع المسموح على الخادم (' . ini_get('post_max_size') . '). ارفع حدّي post_max_size وupload_max_filesize ثم أعد المحاولة.',
|
||||
]);
|
||||
return;
|
||||
}
|
||||
|
||||
$courseId = (int)($request->getBody()['course_id'] ?? $_POST['course_id'] ?? 0);
|
||||
$title = trim((string)($request->getBody()['title'] ?? $_POST['title'] ?? ''));
|
||||
$seqOrder = (int)($request->getBody()['sequence_order'] ?? $_POST['sequence_order'] ?? 1);
|
||||
|
||||
Reference in New Issue
Block a user