module Shrine::Plugins::InferExtension

  1. lib/shrine/plugins/infer_extension.rb

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

Methods

Public Class

  1. configure

Public Class methods

configure (uploader, opts = {})
[show source]
   # File lib/shrine/plugins/infer_extension.rb
 9 def self.configure(uploader, opts = {})
10   uploader.opts[:infer_extension_inferrer] = opts.fetch(:inferrer, uploader.opts.fetch(:infer_extension_inferrer, :mime_types))
11   uploader.opts[:infer_extension_force] = opts.fetch(:force, uploader.opts.fetch(:infer_extension_force, false))
12 end