Module: Shrine::Plugins::DownloadEndpoint

Defined in:
lib/shrine/plugins/download_endpoint.rb

Overview

Documentation can be found on shrinerb.com/docs/plugins/download_endpoint

Defined Under Namespace

Modules: ClassMethods, FileMethods Classes: FileUrl

Class Method Summary collapse

Class Method Details

.configure(uploader, **opts) ⇒ Object



12
13
14
15
# File 'lib/shrine/plugins/download_endpoint.rb', line 12

def self.configure(uploader, **opts)
  uploader.opts[:download_endpoint] ||= { disposition: "inline", download_options: {} }
  uploader.opts[:download_endpoint].merge!(opts)
end

.load_dependencies(uploader) ⇒ Object



7
8
9
10
# File 'lib/shrine/plugins/download_endpoint.rb', line 7

def self.load_dependencies(uploader, **)
  uploader.plugin :rack_response
  uploader.plugin :_urlsafe_serialization
end