[MM-8421] Special PR to have parseImages return nil when format is tiff (#10928)
Этот коммит содержится в:
коммит произвёл
Hanzei
родитель
674b6f2285
Коммит
8e6a158449
@@ -517,5 +517,10 @@ func parseImages(body io.Reader) (*model.PostImage, error) {
|
||||
image.FrameCount = frameCount
|
||||
}
|
||||
|
||||
// Make image information nil when the format is tiff
|
||||
if format == "tiff" {
|
||||
image = nil
|
||||
}
|
||||
|
||||
return image, nil
|
||||
}
|
||||
|
||||
@@ -1995,11 +1995,7 @@ func TestParseImages(t *testing.T) {
|
||||
},
|
||||
"tiff": {
|
||||
FileName: "test.tiff",
|
||||
Expected: &model.PostImage{
|
||||
Width: 701,
|
||||
Height: 701,
|
||||
Format: "tiff",
|
||||
},
|
||||
Expected: (*model.PostImage)(nil),
|
||||
},
|
||||
"not an image": {
|
||||
FileName: "README.md",
|
||||
|
||||
Ссылка в новой задаче
Block a user