From: Joey Hess Date: Tue, 8 Jul 2008 21:18:02 +0000 (-0400) Subject: explicitly set form type to multipart X-Git-Tag: 2.53~29 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2e5785907d6bca9119b1ac0bba31b2260e357613;p=ikiwiki.git 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. --- diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index f49fe63f7..84bf64390 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -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.