search for: db_file_id

Displaying 4 results from an estimated 4 matches for "db_file_id".

2006 Sep 08
4
Does acts_as_attachment :storage => :db_system work?
I found the post about needing to install acts_as_attachement_1_1_6 if you are not on edge rails. But I am having trouble getting db_system storage to work. As far as I can tell in from the database, things are working, but I don''t see how my model table hooks up with the db_files table so I am having trouble altering the image_tag from the tutorial
2008 Oct 08
11
Using image_tag and send_data
...age that I''ve saved to the database (using attachment_fu if you''re curious but that''s probably not relevant here): VIEW <%= image_tag ''/photo/get_image/5'' %> CONTROLLER def get_image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type => @photo.content_type, :file_name => @photo.filename, :disposition => ''inline'') end The images I''m saving are less than 100kb and easily handled by my mysql column...
2008 Oct 14
0
Attachment_fu, db_file and Windows
I''m having trouble serving images which I have saved as db_files with attachment_fu. I use this code to serve the images: Controller -- class PhotoController < ApplicationController def image @photo=Photo.find(params[:id]) send_data(DbFile.find(@photo.db_file_id).data, :type => @photo.content_type, :filename => @photo.filename, :disposition => ''inline'') end end View -- <%=image_tag(url_for(:controller=>''photo'', :action=>...
2007 Jun 29
1
attachment_fu validation error
...Logo.find(:first) #<Logo:0x35593f0 @attributes= {"content_type"=>"image/jpeg", "size"=>"187697", "thumbnail"=>nil, "id"=>"1", "height"=>"768", "db_file_id"=>"3", "filename"=>"img_1651.jpeg", "parent_id"=>nil, "width"=>"1024"}> This happens with all logos in the application, isn''t that suspicious? I''ve not diffed svn with the installe...