Class: Uploadcare::Param::Upload::UploadParamsGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/uploadcare/param/upload/upload_params_generator.rb

Overview

This class generates body params for uploads

Class Method Summary collapse

Class Method Details

.call(options = {}) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/uploadcare/param/upload/upload_params_generator.rb', line 12

def call(options = {})
  {
    'UPLOADCARE_PUB_KEY' => Uploadcare.config.public_key,
    'UPLOADCARE_STORE' => store_value(options[:store]),
    'signature' => (Upload::SignatureGenerator.call if Uploadcare.config.sign_uploads)
  }.merge((options)).compact
end