【问题标题】:Paperclip error [paperclip] Content Type Spoof in nginx server回形针错误 [paperclip] nginx 服务器中的内容类型欺骗
【发布时间】:2017-06-23 21:57:44
【问题描述】:

我在本地运行我的 rails 应用程序,一切都很完美。但是在 nginx 服务器上运行我得到这个错误:

User Load (0.2ms) SELECT users.* FROM users WHERE users.id = 15482 ORDER BY users.id ASC LIMIT 1 App 12917 stderr: Artist Load (0.1ms) SELECT users.* FROM users WHERE users.type IN ('Artist') AND users.id = 15482 LIMIT 1 App 12917 stderr: (0.3ms) BEGIN App 12917 stderr: Command :: PATH=/usr/local/bin:$PATH; file -b --mime '/tmp/c705bd2b503af7c522d45bc0f1bb849720170623-12978-t8220f.jpeg' App 12917 stderr: [paperclip] Content Type Spoof: Filename boxImg22.jpeg (image/jpeg from Headers, ["image/jpeg"] from Extension), content type discovered from file command: . See documentation to allow this combination. App 12917 stderr: User Exists (4.2ms) SELECT 1 AS one FROM users WHERE users.email = BINARY 'manfe@gmail.com' AND (users.id != 15482) LIMIT 1 App 12917 stderr: (0.6ms) ROLLBACK

我不允许使用回形针上传任何文件(图片和 pdf)。

提前致谢

【问题讨论】:

    标签: ruby-on-rails image nginx paperclip


    【解决方案1】:

    我解决了。我卸载 ImageMagick。 (它与 wget、tar、make 等一起安装)。并使用 apt-get install imagemagick

    安装

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-04-03
      • 1970-01-01
      • 2017-04-08
      • 2013-05-04
      • 1970-01-01
      • 2015-10-13
      • 2018-04-28
      相关资源
      最近更新 更多