[MM-8421] Fix tiff preview - backend (#10170)
Этот коммит содержится в:
коммит произвёл
Hanzei
родитель
26d3362eca
Коммит
1018ead619
@@ -42,6 +42,7 @@ var MEDIA_CONTENT_TYPES = [...]string{
|
||||
"image/png",
|
||||
"image/bmp",
|
||||
"image/gif",
|
||||
"image/tiff",
|
||||
"video/avi",
|
||||
"video/mpeg",
|
||||
"video/mp4",
|
||||
|
||||
@@ -346,14 +346,14 @@ func TestUploadFiles(t *testing.T) {
|
||||
// Upload a bunch of files, mixed images and non-images
|
||||
{
|
||||
title: "Happy",
|
||||
names: []string{"test.png", "testgif.gif", "testplugin.tar.gz", "test-search.md"},
|
||||
names: []string{"test.png", "testgif.gif", "testplugin.tar.gz", "test-search.md", "test.tiff"},
|
||||
expectedCreatorId: th.BasicUser.Id,
|
||||
},
|
||||
// Upload a bunch of files, with clientIds
|
||||
{
|
||||
title: "Happy client_ids",
|
||||
names: []string{"test.png", "testgif.gif", "testplugin.tar.gz", "test-search.md"},
|
||||
clientIds: []string{"1", "2", "3", "4"},
|
||||
names: []string{"test.png", "testgif.gif", "testplugin.tar.gz", "test-search.md", "test.tiff"},
|
||||
clientIds: []string{"1", "2", "3", "4", "5"},
|
||||
expectedCreatorId: th.BasicUser.Id,
|
||||
},
|
||||
// Upload a bunch of images. testgif.gif is an animated GIF,
|
||||
@@ -478,6 +478,18 @@ func TestUploadFiles(t *testing.T) {
|
||||
expectedImageHasPreview: []bool{true},
|
||||
expectedCreatorId: th.BasicUser.Id,
|
||||
},
|
||||
// TIFF preview test
|
||||
{
|
||||
title: "Happy image thumbnail/preview 9",
|
||||
names: []string{"test.tiff"},
|
||||
expectedImageThumbnailNames: []string{"test_expected_thumb.tiff"},
|
||||
expectedImagePreviewNames: []string{"test_expected_preview.tiff"},
|
||||
expectImage: true,
|
||||
expectedImageWidths: []int{701},
|
||||
expectedImageHeights: []int{701},
|
||||
expectedImageHasPreview: []bool{true},
|
||||
expectedCreatorId: th.BasicUser.Id,
|
||||
},
|
||||
{
|
||||
title: "Happy admin",
|
||||
client: th.SystemAdminClient,
|
||||
|
||||
Ссылка в новой задаче
Block a user