module Shrine::Plugins::DeleteRaw

  1. lib/shrine/plugins/delete_raw.rb

The delete_raw plugin will automatically delete raw files that have been uploaded. This is especially useful when doing processing, to ensure that temporary files have been deleted after upload.

plugin :delete_raw

By default any raw file that was uploaded will be deleted, but you can limit this only to files uploaded to certain storages:

plugin :delete_raw, storages: [:store]


Public Class

  1. configure

Public Class methods

configure (uploader, opts = {})
[show source]
# File lib/shrine/plugins/delete_raw.rb, line 16
def self.configure(uploader, opts = {})
  uploader.opts[:delete_raw_storages] = opts.fetch(:storages, uploader.opts[:delete_raw_storages])