Исправьте кадрирование и очистку рабочих файлов кодека

This commit is contained in:
2026-11-20 10:54:34 +03:00
parent 7898074f19
commit 42a9bf2071
5 changed files with 76 additions and 10 deletions
+3 -2
View File
@@ -12,6 +12,7 @@ import (
"time"
"github.com/google/uuid"
"messenger/internal/imaging"
"messenger/internal/platform/apperr"
"messenger/internal/platform/faultbarrier"
"messenger/internal/platform/ident"
@@ -35,10 +36,10 @@ type Config struct {
// Binary operations report unavailability in that mode.
func NewService(attachments AttachmentRepository, chats ChatMembership, blobs Blobs, cfg Config) *Service {
if cfg.MaxBytes == 0 {
cfg.MaxBytes = MaxUploadBytes
cfg.MaxBytes = imaging.MaxUploadBytes
}
if cfg.MaxPixels == 0 {
cfg.MaxPixels = MaxImagePixels
cfg.MaxPixels = imaging.MaxImagePixels
}
return &Service{
attachments: attachments,