feat: добавить reconciler PostgreSQL и S3

This commit is contained in:
2026-11-05 21:21:43 +03:00
parent 0ed4b9cea5
commit a3bbdeef42
12 changed files with 751 additions and 15 deletions
+3
View File
@@ -12,6 +12,7 @@ from uuid import UUID, uuid4
from PIL import Image, UnidentifiedImageError
from ..domain.errors import (
Conflict,
Invalid,
NotFound,
PayloadTooLarge,
@@ -137,6 +138,8 @@ class AttachmentService:
async def content(self, actor: User, attachment_id: UUID) -> tuple[Attachment, ObjectStream]:
attachment = await self.get(actor, attachment_id)
if attachment.status != 'ready':
raise Conflict('оригинал вложения недоступен')
try:
stream = await self._storage.get(attachment.object_key)
except FileNotFoundError as error: