trying to make image form controls optionally force image file types... not quite working yet
This commit is contained in:
parent
9791c99d3b
commit
0ad578ffb9
4 changed files with 23 additions and 1 deletions
|
|
@ -73,6 +73,9 @@ sub definition {
|
|||
profileEnabled=>{
|
||||
defaultValue=>1
|
||||
},
|
||||
forceImageOnly=>{
|
||||
defaultValue=>0
|
||||
},
|
||||
});
|
||||
return $class->SUPER::definition($session, $definition);
|
||||
}
|
||||
|
|
@ -142,7 +145,7 @@ sub getValueFromPost {
|
|||
if ($storage->isImage($file)) {
|
||||
$storage->generateThumbnail($file);
|
||||
}
|
||||
else {
|
||||
elsif ($self->get("forceImageOnly")) {
|
||||
$storage->delete;
|
||||
$id = undef;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue