views:

104

answers:

1

Hello,

I am getting an error while trying to upload images on an Ubuntu machine that's running Rails 2.3.4, Ruby 1.8.6 using attachment_fu with image science.

FreeImage exception for type ???: IPTC: Invalid key 'Tag 0x025C'

The error seems to point to this line in the image_science_processor in the attachment_fu plugin:

def with_image(file, &block)
 ::ImageScience.with_image file, &block
end

My initial thoughts are that it has something to do with meta tags and the images and maybe free image. I don't actually see this error on my dev machine - Mac Snow Leopard, Rails 2.3.5, Ruby 1.8.7. Before I start messing versions on the production boxes, has anyone else encountered this issue and have an idea to fix it?

THANKS!!!!

A: 

I'm running into exactly the same error -- I too believe it has something to do with the images that are being uploaded, however I can't really get any good information on what would cause this or what to do about it. Have you had any luck on figuring this out?

UPDATE:

I was able to fix this issue by assigning the content_type after the attachment_fu model is created

example:

@photo_upload = HsPhotoUpload.new(params[:hs_photo_upload])    
@photo_upload.content_type = MIME::Types.type_for(params[:hs_photo_upload][:uploaded_data]).first.to_s
@photo_upload.save!
smnirven
I was able to resolve my problem by updating to the latest version of image_science. I had to manually remove it from ubuntu and download the most recent version and install that. Once I updated image_science, it all worked for me.
cswebgrl