feat(worker): lab5 implement thumbnail generation and complete job logic
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user