public
Description: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.
Homepage: http://wiki.github.com/Squeegy/fleximage
Clone URL: git://github.com/Squeegy/fleximage.git
Fixed a bug that would cause an exception if you had a image_filename macgic 
column and you assigned the image like: @photo.image_file = 
File.open('somefile')
Squeegy (author)
Sat Apr 12 13:46:46 -0700 2008
commit  305defb7de03acd9ccc01ab05caa3ca302a07a91
tree    f938101243ca8789673c3f800d1b89d0d764a1da
parent  aff901aec01ec23110b700cd1480f63420e8baad
...
379
380
381
382
 
 
 
 
 
383
384
385
...
379
380
381
 
382
383
384
385
386
387
388
389
0
@@ -379,7 +379,11 @@ module Fleximage
0
         
0
         # If any magic column names exists fill them with image meta data.
0
         def set_magic_attributes(file)
0
-          self.image_filename = file.original_filename  if self.respond_to?(:image_filename=)
0
+          if self.respond_to?(:image_filename=)
0
+            filename = file.original_filename if file.respond_to?(:original_filename)
0
+            filename = file.basename          if file.respond_to?(:basename)
0
+            self.image_filename = filename
0
+          end
0
           self.image_width    = @uploaded_image.columns if self.respond_to?(:image_width=)
0
           self.image_height   = @uploaded_image.rows    if self.respond_to?(:image_height=)
0
         end

Comments