Hi,
I have a big problem with Database reader. I'd like to make a common stuff - in
the database I are stored binary files (table structure looks: (id, content,
filename, mimetype) and I'd like to map url "file/234" on the accordant file.
Remind, that in the database can be stored everything possible stuff (images,
documents etc.).
I tried to use databasereader. All works ok, until I'd like to change mime-type
to appropriate mime-type stored in the database. For this purpose should be
used parameter "content-type". But it doesn't work and doesn't return regular
value from database. It just returns that string, I inserted with parameter. It
is correct? If so, how can I solve my problem? I tried this solution:
Usual select: "select content, mimetype from files where id=123 and status=1"
Using databasereader:
<map:match pattern="files/*">
<map:read type="databasereader" src="{1}" mime-type="plain/text">
<map:parameter name="table" value="files"/>
<map:parameter name="image" value="content"/>
<map:parameter name="key" value="id"/>
<map:parameter name="where" value="status=1"/>
<map:parameter name="content-type" value="mimetype"/>
</map:read>
</map:match>
But that doesn't work. So how to solve that? Or do you know some alternative
ways?
Thanks a lot for your help!
osup
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]