You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Lionel Crine <cr...@4dconcept.fr> on 2003/05/23 12:21:37 UTC

input type="field"

Hi,


I want to send some picture to a cocoon server from a client computer via 
an <input  type="file"> element in a form.

The input element is a good way to do that ?
Is there a generator which get the value from the input.
Is requestgenerator able to do that ?

Thanks



Lionel CRINE
Société : 4DConcept
22 rue Etienne de Jouy 78353 JOUY EN JOSAS
Tel : 01.34.58.70.70 Fax : 01.39.58.70.70


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


AW: input type="field"

Posted by Marco Rolappe <m_...@web.de>.
hi lionel,

> -----Ursprüngliche Nachricht-----
> Von: cocoon-users-return-50988-m_rolappe=web.de@xml.apache.org
> [mailto:cocoon-users-return-50988-m_rolappe=web.de@xml.apache.org]Im
> Auftrag von Lionel Crine
> Gesendet: Freitag, 23. Mai 2003 12:22
> An: cocoon-users@xml.apache.org
> Betreff: input type="field"
>
>
> Hi,
>
>
> I want to send some picture to a cocoon server from a client computer via
> an <input  type="file"> element in a form.
>
> The input element is a good way to do that ?

at least an easy way, I guess.

> Is there a generator which get the value from the input.

there is a generator (StreamGenerator) that does something similar for xml
files; it generates events from XML files POSTed to it.

> Is requestgenerator able to do that ?

no. the request generator generates an XML representation of the incoming
request.


have a look at the StreamGenerator and the PostInputStream
(org.apache.cocoon.util.PostInputStream).

I'd write a Reader that uses the PostInputStream to receive the content,
then saves that file and sends an according response (200 OK etc.).


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