[bugfix] Fix thumbnail image type (#406)

* fix thumbnail content-type

* test fix thumbnail content-type
This commit is contained in:
tobi 2022-02-21 11:26:26 +01:00 committed by GitHub
commit 15d1e6b3a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 9 deletions

View file

@ -331,7 +331,7 @@ func (m *manager) preProcessMedia(ctx context.Context, data DataFunc, accountID
thumbnail := gtsmodel.Thumbnail{
URL: uris.GenerateURIForAttachment(accountID, string(TypeAttachment), string(SizeSmall), id, mimeJpeg), // all thumbnails are encoded as jpeg,
Path: fmt.Sprintf("%s/%s/%s/%s.%s", accountID, TypeAttachment, SizeSmall, id, mimeJpeg), // all thumbnails are encoded as jpeg,
ContentType: mimeJpeg,
ContentType: mimeImageJpeg,
UpdatedAt: time.Now(),
}