Upload file and insert on a database


I miss something I don't understand what?

i have form:

ho calls

    def contacts_mailer
        mail = Notifier.create_contact_request(params[:contact])
        @contact = Contact.new

        redirect_to :action => 'contact'
        #render :file => "#{RAILS_ROOT}/public/thx1.html"

@contact.file is a BLOB but I am not finding the file it don't get
errors only a 0 byte file


where I use the same funcion Works

class Notifier < ActionMailer::Base
   def contact_request(recipient)
     recipients ""
     from recipient[:email]
     subject "Contact Request from "+recipient[:name]+",
     @body["name"] = recipient[:name]
     @body["company"] = recipient[:company]
     @body["address"] = recipient[:address]
     @body["phone"] = recipient[:phone]
     @body["email"] = recipient[:email]
     @body["notes"] = recipient[:notes]
     @body["file"] = recipient[:file].original_filename
     part :content_type => "text/html", :body =>
render_message("contact_request", @body)
     attachment :content_type => recipient[:file].content_type,
       :body => recipient[:file].read,
       :filename => recipient[:file].original_filename

the mail is correct and the file is atached can anyone help me?