aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-08 17:18:02 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-08 17:18:02 -0400
commit2e5785907d6bca9119b1ac0bba31b2260e357613 (patch)
treedc49a8db815de170ba3d1d709fcc0560b15f4466 /IkiWiki
parentfbd9865232a28d12a81a5bcc792c4bac5c43a9a5 (diff)
downloadikiwiki-2e5785907d6bca9119b1ac0bba31b2260e357613.tar
ikiwiki-2e5785907d6bca9119b1ac0bba31b2260e357613.tar.gz
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.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm2
1 files changed, 2 insertions, 0 deletions
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.