update media processing (#244)

This commit is contained in:
tobi 2021-09-23 11:13:11 +02:00 committed by GitHub
commit ddfd83d0fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 63 additions and 81 deletions

View file

@ -55,7 +55,7 @@ func (mh *mediaHandler) processImageAttachment(data []byte, minAttachment *gtsmo
return nil, errors.New("media type unrecognized")
}
small, err = deriveThumbnail(clean, contentType, 256, 256)
small, err = deriveThumbnail(clean, contentType, 512, 512)
if err != nil {
return nil, fmt.Errorf("error deriving thumbnail: %s", err)
}
@ -109,7 +109,7 @@ func (mh *mediaHandler) processImageAttachment(data []byte, minAttachment *gtsmo
AccountID: minAttachment.AccountID,
Description: minAttachment.Description,
ScheduledStatusID: minAttachment.ScheduledStatusID,
Blurhash: original.blurhash,
Blurhash: small.blurhash,
Processing: 2,
File: gtsmodel.File{
Path: originalPath,