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

@ -697,7 +697,11 @@ sub www_editListingSave {
$storage = WebGUI::Storage::Image->create($self->session);
$data{storageId} = $storage->getId;
}
my $screenshot = $storage->addFileFromFormPost("screenshot");
##This is a hack. File upload should go throught the WebGUI::Form::File API
##so that future changes don't affect us like this
my $screenshot = $storage->addFileFromFormPost("screenshot_file");
if (defined $screenshot) {
$data{filename} = $screenshot;
$storage->generateThumbnail($screenshot);