explicitly set form type to multipart

This is the default in unstable's formbuilder, but not in stable's,
and CGI multipart is needed for fule uploads.
master
Joey Hess 2008-07-08 17:18:02 -04:00
parent fbd9865232
commit 2e5785907d
1 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,8 @@ sub formbuilder_setup (@) { #{{{
my $q=$params{cgi};
if (defined $form->field("do") && $form->field("do") eq "edit") {
# Add attachment field, set type to multipart.
$form->enctype(&CGI::MULTIPART);
$form->field(name => 'attachment', type => 'file');
# These buttons are not put in the usual place, so
# are not added to the normal formbuilder button list.