Update Saqel Platform: 2026-09-02 08:12:57

This commit is contained in:
Hamza-Ayed
2026-09-02 08:12:57 +03:00
parent 36939a50c1
commit a4536395c5
5 changed files with 107 additions and 60 deletions
+8 -1
View File
@@ -147,7 +147,14 @@ class VideoService
$targetFileName = $videoUuid . '.' . $ext;
$targetPath = $storageBase . '/' . $targetFileName;
if (!move_uploaded_file($file['tmp_name'], $targetPath)) {
$moved = is_uploaded_file($file['tmp_name'])
? move_uploaded_file($file['tmp_name'], $targetPath)
: @rename($file['tmp_name'], $targetPath);
if (!$moved && is_file($file['tmp_name'])) {
$moved = @copy($file['tmp_name'], $targetPath);
if ($moved) @unlink($file['tmp_name']);
}
if (!$moved) {
throw new \RuntimeException('فشل حفظ ملف الفيديو على السيرفر، يرجى فحص أذونات المجلد.');
}