module Shrine::Plugins::UploadEndpoint

  1. lib/shrine/plugins/upload_endpoint.rb

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

Methods

Public Class

  1. configure
  2. load_dependencies

Public Class methods

configure (uploader, opts = {})
[show source]
   # File lib/shrine/plugins/upload_endpoint.rb
18 def self.configure(uploader, opts = {})
19   uploader.opts[:upload_endpoint_max_size] = opts.fetch(:max_size, uploader.opts[:upload_endpoint_max_size])
20   uploader.opts[:upload_endpoint_upload_context] = opts.fetch(:upload_context, uploader.opts[:upload_endpoint_upload_context])
21   uploader.opts[:upload_endpoint_upload] = opts.fetch(:upload, uploader.opts[:upload_endpoint_upload])
22   uploader.opts[:upload_endpoint_rack_response] = opts.fetch(:rack_response, uploader.opts[:upload_endpoint_rack_response])
23 end
load_dependencies (uploader, opts = {})
[show source]
   # File lib/shrine/plugins/upload_endpoint.rb
14 def self.load_dependencies(uploader, opts = {})
15   uploader.plugin :rack_file
16 end