Moritz Kobel wrote:

Hi all,

what's the best way to upload a file to a sql-database?

Is it a good way to use the example on
http://wiki.apache.org/cocoon/FileUploadsWithFlow as base and change the upload function to store the filecontent in a database?

Are there any working solutions available?

Your question adresses two different isses: One for file-upload, and one for storing this (or any other) file in a sql-database. There are several different solutions in Cocoon for both of them, but this is how we insert binary data into an sql-database, using the DatabaseUpdateAction:

<?xml version="1.0" encoding="UTF-8"?>
<root>
   <connection>xdb</connection>
   <table name="xblob">
       <keys>
           <key param="id" dbcol="id" type="string"/>
       </keys>
       <values>
<value param="<uri-for-file-content>" dbcol="xdata" type="binary"/>
       </values>
   </table>
</root>

Using a pure flow-based method would also work.

Askild
-

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]