isEnabled()) return; try { $nas->syncVideo($this->video); // Audio/music uploads have no further processing jobs, so it's safe // to remove the local file immediately after a successful NAS push. // Video uploads must keep the local file until GenerateHlsJob finishes. if ($this->video->type === 'music') { $nas->deleteLocalVideo($this->video); $nas->deleteLocalAssets($this->video); } } catch (\Throwable $e) { \Illuminate\Support\Facades\Log::warning('NAS syncVideo failed for video ' . $this->video->id . ': ' . $e->getMessage()); } } }