cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fab Psycho" <psychoro...@hotmail.com>
Subject Re: File upload ?
Date Thu, 05 May 2005 19:46:54 GMT
Hi Tibor,

     My web.xml features

   <init-param>
      <param-name>enable-uploads</param-name>
      <param-value>true</param-value>
    </init-param>

<init-param>
      <param-name>upload-directory</param-name>
      <param-value>c:\temp</param-value>
    </init-param>

My form is declared in xsl :

<xsl:template name="formDocConversion">
              <form action="_docConvert.do" method="post" 
enctype="multipart/form-data">
                    Title : <input name="title"/><br/>
                    File : <input type="file" name="myfile"/><br/>
                    <input type="submit" value="Save"/>
              </form>
</xsl:template>

Function get called correctly but I don't find my file uploaded in c:\temp 
nor web-inf ...What could be wrong ?

I added cocoon.request.get("myfile"); to check upload too but nothing 
happens :(
Something to add in sitemap for upload as well ?

Regards,
Fab

>From: oceatoon <t.katelbach@systheo.com>
>Reply-To: t.katelbach@systheo.com
>To: users@cocoon.apache.org
>Subject: Re: File upload ?
>Date: Thu, 05 May 2005 19:27:55 +0200
>
>Fab Psycho wrote:
>
> > Hi,
> >
> >     I'd like to release some file upload from js flow.
> > (I updated web.xml for file upload)
> >
> > Does something like :
> >
> > var myfile[];
> > myfile=cocoon.request.getParameter("file")
> > write(myfile, "filewritten");
>The file is uploaded to your work directory in WEB-InF as you set in your
>web.xml
>in Flow you can retrieve with
>loaddocument(path/form.getWidget().youruploadwidget.getValue().getFileName())
>and then do waht you feel like move it , modify it ...
>
>Tibor
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>

_________________________________________________________________



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


Mime
View raw message