Preventing Paperclip from deleting/overwriting attachments on update

后端 未结 4 914
灰色年华
灰色年华 2020-12-30 01:39

I\'m having a hard time figuring out how to prevent Paperclip from deleting the old version of an attachment (image).

I have a model, Site, which has an attachment,

4条回答
  •  一向
    一向 (楼主)
    2020-12-30 02:16

    I had a similar issue with Paperclip attachments at when working on a Rails blog last summer.

    There is a patch that addresses this. I wasn't able to get it working for myself, but it's worth a shot!

    http://github.com/alainravet/paperclip/tree/keep_old_files

提交回复
热议问题