fixed: profile photos don't obey max image size
This commit is contained in:
parent
221d5ac0aa
commit
53bdfda753
6 changed files with 15 additions and 8 deletions
|
|
@ -81,6 +81,9 @@ sub definition {
|
|||
forceImageOnly=>{
|
||||
defaultValue=>0
|
||||
},
|
||||
enforceSizeLimits => {
|
||||
defaultValue => 1
|
||||
},
|
||||
dbDataType => {
|
||||
defaultValue => "VARCHAR(22) BINARY",
|
||||
},
|
||||
|
|
@ -201,7 +204,12 @@ sub getValueFromPost {
|
|||
}
|
||||
|
||||
return undef unless @files;
|
||||
$storage->generateThumbnail($_) for @images; # Make a thumbnail for each filename in @images
|
||||
for my $image (@images) {
|
||||
$storage->generateThumbnail($image); # Make a thumbnail for each file
|
||||
if ($self->get('enforceSizeLimits')) {
|
||||
$storage->adjustMaxImageSize($image);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue