Reject empty recording downloads and store WebM with correct MIME.
Deploy Ladill Meet / deploy (push) Successful in 31s

Mark legacy zero-byte placeholders as failed, validate files on show/download, and surface upload errors in the meeting room.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-01 17:59:18 +00:00
co-authored by Cursor
parent 827d36ddc1
commit ceb9ca192e
7 changed files with 108 additions and 9 deletions
@@ -40,6 +40,7 @@ class RecordingController extends Controller
$this->authorizeAbility($request, 'meetings.view');
$this->authorizeOwner($request, $recording);
$recording->load(['session.room', 'session.aiSummaries', 'session.participants']);
$recording = $this->recordings->ensureStorageValid($recording);
$canManage = app(\App\Services\Meet\MeetPermissions::class)
->can($this->member($request), 'meetings.manage');
@@ -51,11 +52,23 @@ class RecordingController extends Controller
{
$this->authorizeAbility($request, 'meetings.view');
$this->authorizeOwner($request, $recording);
abort_unless($recording->isReady() && $recording->storage_path, 404);
$recording = $this->recordings->ensureStorageValid($recording);
abort_unless($recording->hasPlayableFile(), 404, 'Recording file is not available.');
abort_unless(app(\App\Services\Meet\MeetBillingService::class)->storageIsAccessible($recording), 402, 'Recording storage billing is overdue. Top up your Ladill wallet to download this recording.');
return Storage::disk(config('meet.recordings.disk', 'local'))
->download($recording->storage_path, $recording->session->room->title.'.'.pathinfo($recording->storage_path, PATHINFO_EXTENSION));
$disk = Storage::disk(config('meet.recordings.disk', 'local'));
$extension = strtolower(pathinfo($recording->storage_path, PATHINFO_EXTENSION) ?: 'webm');
$mime = match ($extension) {
'webm' => 'video/webm',
'mp4' => 'video/mp4',
'mkv' => 'video/x-matroska',
default => 'application/octet-stream',
};
$filename = \Illuminate\Support\Str::slug($recording->session->room->title).'.'.$extension;
return response()->streamDownload(function () use ($disk, $recording) {
echo $disk->get($recording->storage_path);
}, $filename, ['Content-Type' => $mime]);
}
public function destroy(Request $request, Recording $recording): RedirectResponse