summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-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.