【问题标题】:The image can not be rendered using send_file in IE在 IE 中使用 send_file 无法渲染图像
【发布时间】:2014-05-31 05:25:53
【问题描述】:

我已经使用控制器操作通过以下方法从 url 动态呈现图像文件:

send_file( image_url,  :disposition => 'inline',  :type => 'image/jpeg',  :x_sendfile => true )

图像在 IE 中不显示:

错误:无法在 URL 处解码图像:http://filepathurl.com

任何帮助表示赞赏 谢谢

【问题讨论】:

  • 用于上传您正在使用的 gem ??

标签: ruby-on-rails sendfile


【解决方案1】:

当我尝试从 localhost 打开图像时,我收到了同样的错误消息。我通过将 localhost 添加到受信任的站点并为其设置低安全级别来解决它(当“未签名的 ActiveX 控件将不会被下载”从级别描述中消失时)

【讨论】:

  • 这种方法对最终用户来说听起来不合理。还有其他选择吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-09-06
  • 1970-01-01
  • 2012-08-14
  • 1970-01-01
  • 2022-01-18
  • 2012-01-08
相关资源
最近更新 更多