module Shrine::Plugins::Backup

  1. lib/shrine/plugins/backup.rb

Documentation lives in doc/plugins/backup.md on GitHub.

Methods

Public Class

  1. configure

Public Class methods

configure (uploader, opts = {})
[show source]
   # File lib/shrine/plugins/backup.rb
 9 def self.configure(uploader, opts = {})
10   uploader.opts[:backup_storage] = opts.fetch(:storage, uploader.opts[:backup_storage])
11   uploader.opts[:backup_delete] = opts.fetch(:delete, uploader.opts.fetch(:backup_delete, true))
12 
13   raise Error, "The :storage option is required for backup plugin" if uploader.opts[:backup_storage].nil?
14 end