]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/attachment.pm
attachment: Bugfix to move upload attachments out of holding area when saving.
[ikiwiki.git] / IkiWiki / Plugin / attachment.pm
index 52bac7c1e937ba87e2711ff41319e13a5cfd7814..d8e2f627150e62bdaa4c4ed80a80bb8731f971bb 100644 (file)
@@ -116,9 +116,10 @@ sub formbuilder_setup (@) {
                        $form->tmpl_param("attachments-class" => "toggleable-open");
                }
                
-               # Save attachments in holding area before previewing so
-               # they can be seen in the preview.
-               if ($form->submitted eq "Preview") {
+               # Save attachments in holding area before previewing and
+               # saving.
+               if ($form->submitted eq "Preview" ||
+                   $form->submitted eq "Save Page") {
                        attachments_save($form, $params{session});
                }
        }