You need to change the form tag to have the
enctype="multipart/form-data" attribute.
[]s
Felipe
On 2/21/07, Graeme Rocher <
graemerocher@...> wrote:
> Currently the scaffolding is not clever enough to know that a byte[]
> requires an upload form, we plan to fix this one day
>
> Cheers
>
> On 2/21/07, Oliver Epper <
oliver@...> wrote:
> > Hi all !
> >
> > I experience a little trouble with file uploads in grails.
> > Imagine a newly created app with the following domain-class:
> >
> > class Picture {
> > byte[] picture
> > }
> > Now, let's generate the controller and appropriate views
> > using grails generate-all Picture. I cannot upload any files, because
> > the controllers save method throws an exception while trying to
> > save the instance of the Picture class.
> > Long story short:
> > This happens because the params Map does not contain any
> > key-value pairs :(
> > The funny thing is: If I change the enctype-attribute in create.gsp
> > from "multipart/form-data" to "multipart/form" everything works
> > fine...
> > Hope anyone can explain that to me !!! (please)
> > I use Java 6, and groovy 1.0 and grails 0.4.1
> >
> > --
> > Epper & Kranz GbR
> > Oliver Epper, Patrick Kranz
> > EK IT-Solutions
> > Südring 37
> > 54634 Bitburg
> > Tel: +49 (0)6561 951614
> > Fax: +49 (0)6561 12425
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >
http://xircles.codehaus.org/manage_email> >
> >
>
>
> --
> Graeme Rocher
> Grails Project Lead
>
http://grails.org>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>
http://xircles.codehaus.org/manage_email>
>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email