Rails attachment_fu db_file upload issue

I've recently added attachment_fu to my applicatons, and it works
without reporting any errors. Works fine in :file_system mode, but
not in :db_file mode. It seems to upload only about 45 bytes of data
instead of the entire image, image download works fine when I manually
put the data in the database.

  I've created an Icon model that has the following has_attachment
settings

has_attachment :content_type => :image,
                 :storage => :db_file,
                 :max_size => 1.megabyte,
                 :resize => '75x75>',
                 :processor => 'MiniMagick'

validates_as_attachment

I've removed the resize and processor statements and I'm fairly
confident that the issue is not related to image processing. And
again the upload works to storage type :file_system. My controller
create method looks like this:

def create
   @icon = Icon.new(params[:icon])
   if @icon.save
     flash[:notice] = 'Icon was successfully created.'
     redirect_to :action => 'show', :id => @icon
   else
     render :action => :new
   end
end

And my 'new' view looks like:

<%= error_messages_for :icon %>

<% form_for(:icon, :url => {:action => 'create'},
                     :html => { :multipart => true }) do |f| -%>
<p>
   <label for="icon">Upload An Icon</label>
   <%= f.file_field :uploaded_data %>
</p>
<p>
   <%= submit_tag 'Create' %>
</p>
<% end -%>

Any suggestions would be greatly appreciated.

Thanks,
j

You might want to try posting this on the Rails list.

Joshua Kolden wrote:

···

I've recently added attachment_fu to my applicatons, and it works
without reporting any errors. Works fine in :file_system mode, but
not in :db_file mode. It seems to upload only about 45 bytes of data
instead of the entire image, image download works fine when I manually
put the data in the database.

--
Posted via http://www.ruby-forum.com/\.

Would that there was a comp.lang.ruby.rails, or any usenet .rails
group. If there is a specific list on web somewhere that you
recommend that I'd appreciate if you could point me to it.

Thanks

···

On Sep 11, 8:56 am, Paul Lynch <plynch...@gmail.com> wrote:

You might want to try posting this on the Rails list.

Joshua Kolden wrote:
> I've recently added attachment_fu to my applicatons, and it works
> without reporting any errors. Works fine in :file_system mode, but
> not in :db_file mode. It seems to upload only about 45 bytes of data
> instead of the entire image, image download works fine when I manually
> put the data in the database.

--
Posted viahttp://www.ruby-forum.com/.

Easily found through the rubyonrails.org home page:

http://groups.google.com/group/rubyonrails-talk

Michael Glaesemann
grzm seespotcode net

···

On Sep 11, 2007, at 14:40 , Joshua Kolden wrote:

Would that there was a comp.lang.ruby.rails, or any usenet .rails
group. If there is a specific list on web somewhere that you
recommend that I'd appreciate if you could point me to it.

Excellent, thanks.

···

On Sep 11, 12:45 pm, Michael Glaesemann <g...@seespotcode.net> wrote:

On Sep 11, 2007, at 14:40 , Joshua Kolden wrote:

> Would that there was a comp.lang.ruby.rails, or any usenet .rails
> group. If there is a specific list on web somewhere that you
> recommend that I'd appreciate if you could point me to it.

Easily found through the rubyonrails.org home page:

http://groups.google.com/group/rubyonrails-talk

Michael Glaesemann
grzm seespotcode net