class KeepFileUploader < Shrine
plugin :keep_files
end
class Book < ApplicationRecord
include KeepFileUploader::Attachment(:cover)
end
But I want to delete the files on disk in some context. What’s the best way to do it in Shrine? Thank you.
One method I tried works is using attacher:
Book.first.cover_attacher.destroy
Or how to temporarily enable keep file when uploading a file without enabling keep_file
plugin?