Displaying 3 results from an estimated 3 matches for "get_content_type".
Did you mean:
set_content_type
2006 Feb 24
0
Re: file_column on windows?
I am not able to get this to work on Windows, and the problem has been
documented with a fix here, but I can''t get the fix to work, either. Ok, I
admit it: I am a newbie with rails!
here is the problem''s fix:
You can fix your file_column for now by replacing the get_content_type
method in lib/file_column.rb with this version:
def get_content_type(fallback=nil)
content_type
end
But when I try this, I get:
undefined local variable or method `content_type'' for
#<FileColumn::TempUploadedFile:0x370f9a8>
Obviously, I am doing something wrong... a...
2006 Mar 02
2
How to get mime extension with file_column
Is there a way to get the MIME extension of a file_column field?
Here''s what I want to do (look for comment in before_save method):
class ProductFile < ActiveRecord::Base
belongs_to :product
file_column :file_name
def before_save
self.file_type = # something that returns the MIME type (e.g. image/jpeg)
end
end
TIA
2006 Feb 17
0
file_column generating random empty images
...le, and then it displayed.
I''ve followed the threads (''file_column on windows?'') about the ''file
-bi'' problem, and I installed the GNUWin32 version of file, but the
same problem still exists.
I tried Sebastians idea from the same thread about replacing
get_content_type with another piece of code, but that didn''t work....
Can anyone help me with this? The server logs don''t show anything after
I installed File, so this is hard to troubleshoot.
Here are the two images:
http://www.billigdrucker.de/images/hardware/drucker/dell/dell-farblaser-3100cn...