Made file upload use the Form API instead of the Storage API due to name hacks
This commit is contained in:
parent
6f441d69c3
commit
57fc140369
5 changed files with 15 additions and 12 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue