Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.207 -r1.208 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 18 Mar 2012 16:10:45 -0000 1.207 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 21 Mar 2012 13:45:31 -0000 1.208 @@ -834,6 +834,7 @@ set l [::xowiki::Link create new -destroy_on_cleanup \ -page $object -type "file" -lang $(prefix) \ [list -stripped_name $(stripped_name)] [list -label [my label]] \ + [list -extra_query_parameter [list [list filename [my get_from_value $v name $v]]]] \ -parent_id $(parent_id) -item_id $(item_id)] return [$l render] } @@ -843,9 +844,10 @@ my instvar value set package_id [[my object] package_id] array set entry_info [my entry_name $value] + set fn [my get_from_value $value name $value] set href [$package_id pretty_link -download 1 -parent_id $entry_info(parent_id) $entry_info(name)] if {![my istype image]} { - set href [export_vars -base $href [list [list filename $value]]] + set href [export_vars -base $href [list [list filename $fn]]] } # # The HTML5 handling of "required" would force us to upload in @@ -865,7 +867,7 @@ ::html::input -type hidden -name $id -id $id -value $value #my msg "old_value '$value'" ::html::span -class file-control -id __a$id { - ::html::a -href $href {::html::t [my label_or_value [my get_from_value $value name $value]] } + ::html::a -href $href {::html::t [my label_or_value $fn] } # Show the clear button just when # - there is something to clear, and # - the formfield is not disabled, and Index: openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl,v diff -u -r1.304 -r1.305 --- openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 21 Mar 2012 12:01:18 -0000 1.304 +++ openacs-4/packages/xowiki/tcl/xowiki-www-procs.tcl 21 Mar 2012 13:45:32 -0000 1.305 @@ -437,8 +437,7 @@ $package_id set delivery \ [expr {$use_bg_delivery ? "ad_returnfile_background" : "ns_returnfile"}] if {[my exists_query_parameter filename]} { - set filename [my query_parameter filename] - ns_set put [ns_conn outputheaders] Content-Disposition "attachment;filename=$filename" + ns_set put [ns_conn outputheaders] Content-Disposition "attachment;filename=\"[my query_parameter filename]\"" } #my log "--F FILE=[my full_file_name] // $mime_type" set geometry [::xo::cc query_parameter geometry ""]