Why are RackMultipart* files persisting in my Rails /tmp directory?

后端 未结 3 1237
一整个雨季
一整个雨季 2021-02-05 17:44

I\'m using Paperclip (2.3) to handle image uploads on a Rails 3.0.3 app running on Ubuntu. Paperclip is handling the uploads as advertised BUT the RackMultipart* files that are

3条回答
  •  南笙
    南笙 (楼主)
    2021-02-05 18:18

    The TempFileReaper is the Rack middleware thought to handle this issue.

    http://www.rubydoc.info/github/rack/rack/Rack/TempfileReaper

    Including this line in the application.rb solves the problem:

    config.middleware.use Rack::TempfileReaper
    

提交回复
热议问题