Update Saqel Platform: 2026-09-08 18:26:41

This commit is contained in:
Hamza-Ayed
2026-09-08 18:26:41 +03:00
parent e5cbd89323
commit 4008d4a435
3 changed files with 15 additions and 4 deletions
@@ -1,6 +1,5 @@
import 'package:flutter/services.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import '../utils/app_logger.dart';
/// Ultra-Resilient Storage Service for Teacher Studio
class StorageService {
@@ -25,8 +24,9 @@ class StorageService {
_volatileStore[key] = value;
try {
await _secureStorage.write(key: key, value: value);
} on PlatformException catch (e) {
AppLogger.log('Keychain notice ($key): ${e.message}', tag: 'STORAGE');
} on PlatformException {
// Unsigned macOS debug builds cannot access Keychain. The in-process
// fallback above keeps the session active without logging a false error.
} catch (_) {}
}
@@ -370,7 +370,7 @@ class _TeacherStudioUploadTabState extends State<TeacherStudioUploadTab> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
const Text(
'مدة الشرح الرقمي المستخرجة:',
'مدة الشرح التقريبية (يؤكدها الخادم من الملف):',
style: TextStyle(
fontSize: 13,
fontWeight: FontWeight.w700,
@@ -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);