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
View File
@@ -112,4 +112,44 @@ class MeetRecordingUploadTest extends TestCase
$this->assertNotNull($recording->storage_path);
Storage::disk('local')->assertExists($recording->storage_path);
}
public function test_empty_ready_recording_is_marked_failed(): void
{
$room = Room::create([
'organization_id' => $this->organization->id,
'owner_ref' => $this->user->public_id,
'host_user_ref' => $this->user->public_id,
'title' => 'Empty recording',
'type' => 'instant',
'status' => 'live',
'timezone' => 'UTC',
]);
$session = Session::create([
'room_id' => $room->id,
'owner_ref' => $this->user->public_id,
'media_room_name' => 'room-'.$room->uuid,
'status' => 'ended',
'started_at' => now()->subHour(),
'ended_at' => now(),
]);
$recording = Recording::create([
'owner_ref' => $this->user->public_id,
'session_id' => $session->id,
'status' => 'ready',
'layout' => 'gallery',
'storage_path' => 'recordings/'.$session->uuid.'/empty.webm',
'file_size' => 0,
'started_at' => now()->subHour(),
'ended_at' => now(),
]);
Storage::disk('local')->put($recording->storage_path, '');
$recording = app(\App\Services\Meet\RecordingService::class)->ensureStorageValid($recording);
$this->assertSame('failed', $recording->status);
$this->assertNull($recording->storage_path);
}
}