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

后端 未结 3 1269
一整个雨季
一整个雨季 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条回答
  •  萌比男神i
    2021-02-05 18:17

    I don't know if this is anymore elegant but this is what I am doing after the file is saved"

    tempfile = params[:file].tempfile.path
    if File::exists?(tempfile)
      File::delete(tempfile)
    end
    

提交回复
热议问题