made it so it's possible to use file form elements without any auxillary code

fixed a bug in Post
storage copy can accept an optional new storage location to copy to
articles can now accept direct attachments
This commit is contained in:
JT Smith 2006-04-16 17:30:01 +00:00
parent c523f9c09d
commit 4adfc0737c
13 changed files with 131 additions and 35 deletions

View file

@ -156,7 +156,12 @@ sub getValueFromPost {
} elsif ($self->session->form->param($self->privateName('action')) eq 'keep') {
return $value;
} elsif ($self->session->form->param($self->privateName('action')) eq 'upload') {
my $storage = WebGUI::Storage::Image->create($self->session);
my $storage = undef;
if ($self->get("value") ne "") {
$storage = WebGUI::Storage::Image->get($self->session, $self->get("value"));
} else {
$storage = WebGUI::Storage::Image->create($self->session);
}
$storage->addFileFromFormPost($self->get("name"),1000);
my @files = @{ $storage->getFiles };
if (scalar(@files) < 1) {