开发者

Attachment_fu error

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!!!!


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!
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜