【发布时间】: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