Index: openacs-4/packages/attachments/www/doc/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/doc/index.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/attachments/www/doc/index.adp 7 Aug 2017 23:48:04 -0000 1.2 +++ openacs-4/packages/attachments/www/doc/index.adp 30 Apr 2018 09:06:19 -0000 1.3 @@ -91,30 +91,26 @@ attachments is not properly mounted. To do this, add the following proc to your package's API and wrap all calls to the attachments package with it:

-
-    ad_proc -private attachments_enabled_p {} {
+
    ad_proc -private attachments_enabled_p {} {
         set package_id [site_node_apm_integration::child_package_exists_p \
             -package_key attachments
         ]
-    }
-
+ }

1.2.3.2 Get the attachment Url

When you want to set up the link that the user can click on to attach something to an object, use the attachments::add_attachment_url proc, which will return the correct Url into the attachments package mounted under your package.

-
-    if {$attachments_enabled_p} {
+
    if {$attachments_enabled_p} {
         if {$attach_p} {
             set redirect_url [attachments::add_attachment_url \
                                   -object_id $message_id \
                                   -return_url $redirect_url \
                                   -pretty_name "$subject"]
         }
-    }
-
+ }

forums redirects the user to the redirect_url, if the user chose to add an attachment to their posting.