On 06.Jun.2002 -- 06:56 AM, Andrew Timberlake wrote:
> Gerhard
> 
> I think that your problem is not mysql but the use of the
> DatabaseAddAction.
> Looking through the source for the DatabaseAddAction indicates no
> awareness of Uploaded Files.
> The error you are receiving below shows that cocoon is correctly
> retrieving your file and placing it in a FilePartFile object but the
> DatabaseAddAction is retrieving the data through request.getParameter()
> which only returns a string showing you the toString() results of the
> FilePartFile object.
> If you handle the database work in your own action you will have no
> problem adding the binary data (Correction: using mysql's default
> limits, you will only be able to store 1M of information (Change
> max_allowed_packet if you need more)).
> 
> You should be able to write a small action which reads the FilePart and
> places the actual file into a request Attribute.

And if you were using the "new" database actions (scratchpad in 2.0.3,
o.a.c.acting.modular package in HEAD), you would just write your custom
"InputModule" (o.a.c.components.modules.input) which is *really*
simple. Ahem, well, currently the setColumn method does not allow to
provide an InputStream or a Reader to it but that would be POC to
change. 

        Chris.

-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to