ruby-on-rails – IE8中的Paperclip照片上传失败
发布时间:2020-12-17 04:28:25 所属栏目:百科 来源:网络整理
导读:我正在使用paperclip在我的应用中上传图片.验证我是: validates_attachment_content_type :image,:content_type = ['image/jpg','image/jpeg','image/png','image/tiff','image/gif'] 在firefox,chorme和IE9中一切都运行良好.但在IE8中,我收到错误 – “照
我正在使用paperclip在我的应用中上传图片.验证我是:
validates_attachment_content_type :image,:content_type => ['image/jpg','image/jpeg','image/png','image/tiff','image/gif'] 在firefox,chorme和IE9中一切都运行良好.但在IE8中,我收到错误 – 任何解决方案或线索都非常感谢. 解决方法
说它需要内容类型的额外图像格式image / pjpeg,即:content_type => [ ‘图像/ PJPEG’]
以下将有所帮助. http://blog.joshsoftware.com/2010/11/26/paperclip-validates_attachment_content_type-always-fails-in-ie-6-and-7-for-jepg-and-png-image/ http://blog.siyelo.com/tip-of-the-day-mime-types-for-paperclip-ie8 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |