Update Saqel Platform: 2026-09-02 08:12:57
This commit is contained in:
@@ -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('فشل حفظ ملف الفيديو على السيرفر، يرجى فحص أذونات المجلد.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user