projects
/
ikiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbd9865
)
explicitly set form type to multipart
author
Joey Hess
<joey@kodama.kitenet.net>
Tue, 8 Jul 2008 21:18:02 +0000
(17:18 -0400)
committer
Joey Hess
<joey@kodama.kitenet.net>
Tue, 8 Jul 2008 21:18:02 +0000
(17:18 -0400)
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
patch
|
blob
|
history
diff --git
a/IkiWiki/Plugin/attachment.pm
b/IkiWiki/Plugin/attachment.pm
index f49fe63f770aef606ad8208bac4377a9e8c360e4..84bf643905f75dccf9122dc4a91bbfc201cc7079 100644
(file)
--- 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.