Made file upload use the Form API instead of the Storage API due to name hacks

This commit is contained in:
Colin Kuskie 2007-03-06 03:43:48 +00:00
parent 6f441d69c3
commit 57fc140369
5 changed files with 15 additions and 12 deletions

View file

@ -136,10 +136,10 @@ sub edit {
#-------------------------------------------------------------------
sub editSave {
my $self = shift;
my $tempStorage = WebGUI::Storage->create($self->session);
##This is a hack. File uploads should go through the WebGUI::Form::File API
$tempStorage->addFileFromFormPost("file_file");
my $tempFileStorageId = WebGUI::Form::File->new($self->session,{name => 'file'})->getValueFromPost;
my $tempStorage = WebGUI::Storage->get($self->session, $tempFileStorageId);
foreach my $filename (@{$tempStorage->getFiles}) {
my $storage = WebGUI::Storage::Image->create($self->session);