cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "g[R]eK" <>
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 <> 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}"/>

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                                    .>

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message