Displaying 20 results from an estimated 1000 matches similar to: "attachment_fu content_type problem"
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested.
But, I added some code to that model that I do need to test. Basically,
I need to somehow fulfill the "uploaded_data" property so I can actually
run my tests(otherwise they fail because of validations). The
"uploaded_data" field is what would grab the multipart data from form.
Here
2007 Sep 25
2
attachment_fu default path
Hi all. I''ve done a little google search, but doesn''t find anything
(with "attachment_fu default path") that could help me in changing
attachment_fu''s default path.
My model:
[audio.rb]
has_attachment :max_size => 20.megabytes
has_attachment :content_type => "audio/mpeg"
has_attachment :storage => :file_system
2009 Apr 21
3
attachment_fu giving problem on production
Hello friends,
I have configured attachment_f. It''s working fine on Local(development)
system but giving problem on production. Basically on production the
attachment_fu is not able to generate thumbnail image it saving the original
size image. Below is the configuration.
has_attachment :content_type => :image,
:storage => :file_system,
:max_size
2007 Apr 08
13
attachment_fu thumbnail not created
I followed the instructions on Mike Clark''s weblog and everything
works perfectly except the thumbnail column in my DB is alwas NULL.
I''m using S3 as my storage system. Anyone else having this issue with
thumbnails?
has_attachment :content_type => :image,
:storage => :s3,
:max_size => 500.kilobytes,
:resize_to =>
2007 Jul 04
2
content_type from a local file?
I''m using a Rake task to add local files into a database designed for
use with attachment_fu.
http://eldorado.googlecode.com/svn/trunk/db/migrate/039_create_avatars.rb
http://eldorado.googlecode.com/svn/trunk/lib/tasks/import_files.rake
So, attachment_fu has a "content_type" field, which apparently is
receiving that information from the browser...?
I''m trying to
2007 Mar 11
4
Faking it... import local files into attachment_fu
Hello,
I''m working on an import utility that will match the functionality of
uploading an object of a model that uses attachment_fu for
thumbnailing, etc.
Rather than uploading the file via a form, I want to populate the
params[:image][:uploaded_data] with data from a file already on the
server''s file system.
So far, I''ve been able to copy to an instance of Tempfile
2007 Apr 21
3
attachment_fu thumbnails
howdy!
I had the problem that attachment_fu didn''t make a thumbnail, but
everything else worked. I read this post
http://www.ruby-forum.com/topic/104213 and added a parent_id column. now
I get the following error when I trie to add a photo:
undefined method `find_or_initialize_by_thumbnail_and_parent_id'' for
Photo:Class
my code is:
class Photo < ActiveRecord::Base
2007 May 07
1
attachment_fu seems to be searching the wrong location for my images
I just installed attachment_fu and for some reason, it seems to be
looking in the wrong location for my images.
I have a Product model that belongs to a photo model. the photo model
has the attachment_fu installed and configured like so:
class Photo < ActiveRecord::Base
has_attachment :content_type => :image, #Allow
standard image formats
:path_prefix
2010 Apr 24
2
problem using attachment_fu with S3
Hi,
My S3 bucket is located in the US
I have attachment_fu working when using file system storage
I have sw-swf upload plugin working with my S3 account
but I can not get attachment_fu to work with S3 storage.
the error I get is :
AWS::S3::RequestTimeout in Upload filesController#create
Your socket connection to the server was not read from or written to
within the timeout period. Idle
2007 Dec 31
3
undefined method `content_type'
I am using form_remote_tag to upload a file, but it says ..
undefined method `content_type'' for #<String:0x477a930>
what could be wrong when it works fine with form_for?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To
2007 Mar 28
3
attachment_fu Not Resizing
Hello,
Recently attachment_fu stopped resizing images for me. I''m puzzled
because before today it was resizing them and I don''t know what''s
changed. Here''s my code:
class Product < ActiveRecord::Base
has_attachment :content_type => :image,
:storage => :file_system,
:max_size => 18.megabytes,
2008 May 28
1
Attachment_fu, polymorphism and customization
Hi,
I got Image model that has_attachment and belongs_to 2 other models
via polymorphic association.
The problem is that I''d like to customize has_attachment options
(resize image) depending on which model the Image is related to - i.e.
if Image belongs to Article it should be resized using different
settings than if it belongs to Header.
Is there a smart way to do it or do I have to
2007 Sep 18
2
Making attachment_fu polymorphic
I am working on a small model mixin called attachment_kung to make
attachment_fu polymorphic, so you no longer need a different table and
Model class for every associated attachment (Productimage, Ad_doc,
etc). All you really need is one model and table to handel all your
attachments - in some cases, anyway. I have the code working, but have
run into one small hitch that I can''t seem to
2009 Mar 06
1
attachment_fu has_attachment model logic reasoning?
Both Attachment_fu and Paperclip use something like ''has_attachment'' to
work their magic on an existing model like a User in the context of a
profile picture or something like that.
I find this idea pretty constricting, as it doesn''t allow for multiple
profile pictures for example. Or at least I wouldnt know how to set this
up with either of the 2 plugins.
I am
2007 Jul 22
3
Attachment fu on windows
I''ve tried and tried. I couldn''t get freeimage installed. I got
mini_magick installed, but everytime I try Mike Clark''s tutorial, I
get the error ''Size is not in the list''. I found some people fixed
this by putting a sleep statement in their controller, but this didn''t
work for me. Any help out there?
2007 Apr 17
1
attachment_fu - propagating attributes to thumbnails
I have a model using attachment_fu (via has_attachment) and I''m
creating thumbnails for the attached images. I have an extra field
''foo'' that I''m validating on create with validates_presence_of :foo.
One problem arises when I upload an image:
The ''foo'' is not propogating down to the thumbnails. What should I
put in my model to grab the
2008 Apr 25
1
attachment_fu and mime type issues
Hi All,
I am having a problem with the attachment_fu plugin and flac audio files. In
the dev environment, using mongrel, the form upload object does not seem to
have any associated content_type. I get the following attachment_fu
validation error: "Content type can''t be blank". I don''t understand why the
file_data would not have any content_type. Doesn''t rails
2007 Dec 08
3
Uploading photos using facebook & attachment_fu
Hi All,
I''m trying to use a form to upload a photo that I will save using
attachment_fu. I''m very new to Facebookr so I apologize if this is covered
somewhere, but I''m kind of stumped.
Here''s what I''m doing now:
<% facebook_form_for(:my_object, :url => { :action => ''upload_photo'', :id =>
params[:id] }, :html => {
2008 Oct 08
11
Using image_tag and send_data
I am using image_tag to load an image 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 =>
2008 Mar 14
2
attachment_fu attributes in db
I''m using file_column for upload images.
now,I want to use the plugin attachment_fu.
I have seen that for use it, i must create the attributes like:
class CreateMugshots < ActiveRecord::Migration
def self.up
create_table :mugshots do |t|
t.column :parent_id, :integer
t.column :content_type, :string
t.column :filename, :string
t.column :thumbnail,