Class: RenuoUpload::Uploader

Inherits:
Object
  • Object
show all
Defined in:
lib/renuo_upload/uploader.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Uploader

Returns a new instance of Uploader.



7
8
9
10
# File 'lib/renuo_upload/uploader.rb', line 7

def initialize(config)
  @config = config
  @policy = retrieve_policy
end

Instance Method Details

#upload(file) ⇒ Object



12
13
14
15
# File 'lib/renuo_upload/uploader.rb', line 12

def upload(file)
  RestClient.post upload_url, upload_hash(file)
  uploaded_file_url file
end