Problems with upload using attachment_fu

Nerdaniel
Tue, 19 May 2009 03:48:45 -0000

Hello everyone,

I''m having problems with :html => { :multipart => true } in my
edit
form. It doesn''t returns the image in the parameter, so everything
fails with this errors:

There were problems with the following fields:

    * Size can''t be blank
    * Size is not included in the list
    * Content type can''t be blank
    * Content type is not included in the list
    * Filename can''t be blank

A friend of mine said that he had this problem in windows and I am in
a mac 10.5.6. =/

If I put multipart off it gives the same error. Everything I
implemented was following attachment_fu tutorials all over the net.
This is my edit:

= error_messages_for :user, :avatar

- form_for(@user, :url => { :action => ''update'' }, :html
=>
{ :multipart => true }) do |f|
  = f.label "avatar"
  %br
  = f.file_field :avatar
  %br
  %br
  = f.submit "save image!"

Thx!