Class: OutdatedPicker

Inherits:
Picker
  • Object
show all
Defined in:
lib/filestack_rails/filestack_js.rb

Instance Attribute Summary

Attributes inherited from Picker

#url

Instance Method Summary collapse

Methods inherited from Picker

#domain, #initialize, #version

Constructor Details

This class inherits a constructor from Picker

Instance Method Details

#filestack_js_urlObject



36
37
38
# File 'lib/filestack_rails/filestack_js.rb', line 36

def filestack_js_url
  'https://static.filestackapi.com/v3/filestack.js'
end

#picker(client_name, api_key, options, callback, other_callbacks = nil) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/filestack_rails/filestack_js.rb', line 40

def picker(client_name, api_key, options, callback, other_callbacks = nil)
  <<~HTML
    (function(){
      #{client_name}.pick(#{options}).then(function(data){#{callback}(data)})
    })()
  HTML
end

#security(signature, policy) ⇒ Object



48
49
50
# File 'lib/filestack_rails/filestack_js.rb', line 48

def security(signature, policy)
  { signature: signature, policy: policy }.to_json
end