Revision [5244]

This is an old revision of RalphThesen made by RalphThesen on 2005-01-26 20:49:06.



FilesAction with the correct MIME Header (based upon mimes.txt)

Replace line 16:
            Header("Content-Type: application/x-download");

with the following lines :
        // Examine Suffix
          if (preg_match("/.*\.(\w+)$/i",$filename,$res))
          // Search MIME Type
            if (!$suffix || $suffix=="" || !$this->config['mime_types']
               || !$mimes=implode("\n",file($this->config['mime_types'])))
            else {
               if (preg_match("/([A-Za-z\/-]*).*$suffix/i",$mimes,$result))
          Header("Content-Type: ".$content_type);
There are 5 comments on this page. [Show comments]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki