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.198 -r1.199 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 28 Dec 2011 18:08:36 -0000 1.198 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 10 Feb 2012 18:22:14 -0000 1.199 @@ -742,7 +742,9 @@ array set entry_info [my entry_name $value] set content_type [my set content-type] - if {$content_type eq "application/octetstream"} { + if {$content_type eq "application/octetstream" + || $content_type eq "application/force-download" + } { set content_type [::xowiki::guesstype $value] } #my msg "mime_type of $entry_name = [::xowiki::guesstype $value] // [my set content-type] ==> $content_type" Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.125 -r1.126 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 8 Nov 2010 13:52:10 -0000 1.125 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 10 Feb 2012 18:22:14 -0000 1.126 @@ -176,14 +176,17 @@ proc ::xowiki::guesstype {fn} { set mime [ns_guesstype $fn] - if {$mime eq "*/*" || $mime eq "application/octet-stream"} { + if {$mime eq "*/*" + || $mime eq "application/octet-stream" + || $mime eq "application/force-download"} { # ns_guesstype was failing switch [file extension $fn] { .xotcl {set mime text/plain} .mp3 {set mime audio/mpeg} .cdf {set mime application/x-netcdf} .flv {set mime video/x-flv} .swf {set mime application/x-shockwave-flash} + .pdf {set mime application/pdf} .wmv {set mime video/x-ms-wmv} .class - .jar {set mime application/java} default {set mime application/octet-stream} @@ -494,7 +497,9 @@ $data set import_file [$data form_parameter upload_file.tmpfile] set mime_type [$data form_parameter upload_file.content-type] if {[db_0or1row [my qn check_mimetype] {select 1 from cr_mime_types - where mime_type = :mime_type}] == 0 || $mime_type eq "application/octet-stream"} { + where mime_type = :mime_type}] == 0 + || $mime_type eq "application/octet-stream" + || $mime eq "application/force-download"} { set guessed_mime_type [::xowiki::guesstype $upload_file] #my msg guess=$guessed_mime_type if {$guessed_mime_type ne "*/*"} {