cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "g[R]eK" <g...@warsztat.pac.pl>
Subject Re[2]: Handle Non-HTML Files
Date Thu, 19 Aug 2004 23:08:36 GMT
<. Hi Kirk! .>

Thursday, August 19, 2004, 4:39:31 PM, you wrote:

KS> To clarify, I am refering to serving files that have
KS> been uploaded. I am not trying to generate these
KS> documents.

KS> --- Kirk Storer <backsstock@yahoo.com> wrote:

>> I was wondering if there was an easy way to handle
>> non-html files. I have a few entries in my sitemap
>> such as this. 
>> 
>>     <map:match pattern="images/*.gif">
>>       <map:read mime-type="images/gif"
>> src="resources/images/{1}.gif"/>
>>     </map:match>
>> 
>> However, trying to guess all the different files
>> types
>> people will use ahead of time is nearly impossible
>> (.doc .xsl .mov .mpg .whoknowswhatelse)
>> 
>> Is there an easy way to serve all unreconized
>> exstensions? eg. Assume they are all stored in a
>> certain directory.
>> 

Yeah, it's simple, just use something like this:
  <map:match pattern="uploaded/**">
    <map:read src="uploaddir/{1}"/>
  </map:match>

It will work properly, but there is a problem with mime-type. I think, there is
no good method, just do matches for common types (and there set mime-type) and
use above match.

-- 
Best regards
<. g[R]eK mailto:gReK@warsztat.pac.pl                                    .>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message