From 2e5785907d6bca9119b1ac0bba31b2260e357613 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 8 Jul 2008 17:18:02 -0400 Subject: [PATCH] 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. --- IkiWiki/Plugin/attachment.pm | 2 ++ 1 file changed, 2 insertions(+) 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. -- 2.32.0.93.g670b81a890