Class: Kilt::Upload

Inherits:
Object
  • Object
show all
Defined in:
lib/kilt/upload.rb

Class Method Summary collapse

Class Method Details

.do(type, file_reference) ⇒ Object



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

def self.do(type, file_reference)
  if Kilt.config.storage.strategy == 'local'
    self.handle_local_upload(type, file_reference)
  elsif Kilt.config.storage.strategy == 's3'
    self.handle_s3_upload(type, file_reference)
  end
end

.file(file_reference) ⇒ Object



4
5
6
# File 'lib/kilt/upload.rb', line 4

def self.file(file_reference)
  self.do('file', file_reference)
end

.image(file_reference) ⇒ Object



8
9
10
# File 'lib/kilt/upload.rb', line 8

def self.image(file_reference)
  self.do('image', file_reference)
end