feat(worker): lab5 implement thumbnail generation and complete job logic

This commit is contained in:
Голиков Maximillian Антон
2026-11-09 12:39:59 +03:00
parent 872406773f
commit 22c876f63c
3 changed files with 34 additions and 11 deletions
+2
View File
@@ -9,6 +9,7 @@ import (
_ "image/png"
"high-loud-apps-labs/internal/domain"
"time"
"github.com/disintegration/imaging"
)
@@ -37,6 +38,7 @@ func Thumbnail(attachmentID string, imgData []byte) (*domain.AttachmentVariant,
Width: thumb.Bounds().Dx(),
Height: thumb.Bounds().Dy(),
SHA256: sha[:],
CreatedAt: time.Now().UTC(),
}
return v, data, nil
}