@@ -30,6 +30,7 @@ class Image extends File
30
30
const SQUARE_NOT_ALLOWED_ERROR = '5d41425b-facb-47f7-a55a-de9fbe45cb46 ' ;
31
31
const LANDSCAPE_NOT_ALLOWED_ERROR = '6f895685-7cf2-4d65-b3da-9029c5581d88 ' ;
32
32
const PORTRAIT_NOT_ALLOWED_ERROR = '65608156-77da-4c79-a88c-02ef6d18c782 ' ;
33
+ const CORRUPTED_IMAGE_ERROR = '5d4163f3-648f-4e39-87fd-cc5ea7aad2d1 ' ;
33
34
34
35
// Include the mapping from the base class
35
36
@@ -49,6 +50,7 @@ class Image extends File
49
50
self ::SQUARE_NOT_ALLOWED_ERROR => 'SQUARE_NOT_ALLOWED_ERROR ' ,
50
51
self ::LANDSCAPE_NOT_ALLOWED_ERROR => 'LANDSCAPE_NOT_ALLOWED_ERROR ' ,
51
52
self ::PORTRAIT_NOT_ALLOWED_ERROR => 'PORTRAIT_NOT_ALLOWED_ERROR ' ,
53
+ self ::CORRUPTED_IMAGE_ERROR => 'CORRUPTED_IMAGE_ERROR ' ,
52
54
);
53
55
54
56
public $ mimeTypes = 'image/* ' ;
@@ -61,6 +63,7 @@ class Image extends File
61
63
public $ allowSquare = true ;
62
64
public $ allowLandscape = true ;
63
65
public $ allowPortrait = true ;
66
+ public $ detectCorrupted = false ;
64
67
65
68
// The constant for a wrong MIME type is taken from the parent class.
66
69
public $ mimeTypesMessage = 'This file is not a valid image. ' ;
@@ -74,4 +77,5 @@ class Image extends File
74
77
public $ allowSquareMessage = 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed. ' ;
75
78
public $ allowLandscapeMessage = 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed. ' ;
76
79
public $ allowPortraitMessage = 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed. ' ;
80
+ public $ corruptedMessage = 'This file contains corrupted image. ' ;
77
81
}
0 commit comments