feat: крролик, по тщ 5 лаба

This commit is contained in:
Enterxx2
2026-11-10 12:38:09 +03:00
parent 1d8dfb7ea4
commit 595a959b96
65 changed files with 2692 additions and 216 deletions
@@ -27,7 +27,7 @@ IMAGE_BODY = {
@attachments_router.post(
"/chats/{chat_id}/attachments",
status_code=status.HTTP_201_CREATED,
status_code=status.HTTP_202_ACCEPTED,
response_model=AttachmentSchema,
openapi_extra={"requestBody": {"required": True, "content": IMAGE_BODY}},
)
@@ -41,8 +41,7 @@ async def upload_attachment(
service: AttachmentService = Depends(ServiceCreator.get_attachment_service),
) -> AttachmentSchema:
"""
Сырые байты одного PNG/JPEG, не multipart. 201 ready — только после
сохранения оригинала в S3 и метаданных в PostgreSQL.
Сырые байты одного PNG/JPEG, не multipart. 202 queued — после staging и транзакции job/outbox; resize выполняет worker.
"""
return await service.upload(
current_user,