xowiki::guesstype

 xowiki::guesstype

Defined in

Partial Call Graph (max 5 caller/called nodes):
%3 packages/xowiki/www/ckeditor-images/upload_image.tcl packages/xowiki/ www/ckeditor-images/upload_image.tcl xowiki::guesstype xowiki::guesstype packages/xowiki/www/ckeditor-images/upload_image.tcl->xowiki::guesstype xowiki::Page instproc create_link xowiki::Page instproc create_link xowiki::Page instproc create_link->xowiki::guesstype xowiki::test::require_page xowiki::test::require_page (private) xowiki::test::require_page->xowiki::guesstype ad_file ad_file (public) xowiki::guesstype->ad_file

Testcases:
No testcase defined.
Source code:
    set mime [ns_guesstype $fn]
    if {$mime eq "*/*"
        || $mime eq "application/octet-stream"
        || $mime eq "application/force-download"} {
      #
      # ns_guesstype was failing, which should not be the case with
      # recent versions of NaviServer
      #
      switch [ad_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/vnd.adobe.flash-movie}
        .pdf {set mime application/pdf}
        .wmv {set mime video/x-ms-wmv}
        .class - .jar  {set mime application/java}
        default {set mime application/octet-stream}
      }
    }
    return $mime
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: