Index: openacs-4/packages/attachments/www/attach.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/attach.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/attachments/www/attach.tcl 16 Jul 2018 07:44:11 -0000 1.14 +++ openacs-4/packages/attachments/www/attach.tcl 3 Sep 2024 15:37:35 -0000 1.15 @@ -32,7 +32,7 @@ # Load up file storage information if {$folder_id eq ""} { set folder_id [attachments::get_root_folder] -} +} # sanity check if {$folder_id eq ""} { @@ -58,9 +58,11 @@ if { $type eq "folder" } { set name_url [export_vars -base "attach" { {folder_id $object_id} {object_id $to_object_id} return_url pretty_object_name}] } else { + if {$content_size ne ""} { + set content_size [lc_content_size_pretty -size $content_size] + } set action_url [export_vars -base "attach-2" {{item_id $object_id} {object_id $to_object_id} return_url pretty_object_name}] } - } set passthrough_vars "object_id=$to_object_id&return_url=[ns_urlencode $return_url]&pretty_object_name=[ns_urlencode $pretty_object_name]"