trying to make image form controls optionally force image file types... not quite working yet

This commit is contained in:
Roy Johnson 2006-11-07 23:47:37 +00:00
parent 9791c99d3b
commit 0ad578ffb9
4 changed files with 23 additions and 1 deletions

View file

@ -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;
}