fix for file uploading problems in File, Image, FilePile, Graphics (font) and FormHelper

This commit is contained in:
Colin Kuskie 2007-02-16 22:31:53 +00:00
parent 6c8e840fe6
commit ab6d0d2ce6
7 changed files with 28 additions and 6 deletions

View file

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