lab4: исправления по ревью (парсеры image/text только на upload, rejected-статус прямой загрузки, диапазон 64 KiB, отчёт)

This commit is contained in:
2026-10-22 23:04:05 +03:00
parent f048a37df9
commit 830e5811fc
20 changed files with 933 additions and 805 deletions
+13
View File
@@ -228,6 +228,19 @@ describe('direct upload (presigned PUT)', () => {
404,
'not_found',
);
// The URL is still valid: a re-PUT must stay tracked so the sweeper
// removes the new object too.
expect((await put(ticket, jpeg)).status).toBe(200);
const row = await db.query<{ status: string }>(
'SELECT status FROM attachments WHERE id = $1',
[ticket.attachment_id],
);
expect(row.rows[0]?.status).toBe('rejected');
expectError(
await complete(alice.token, ticket.attachment_id),
404,
'not_found',
);
});
it('rejects a pixel bomb on complete', async () => {