Class: Bubbles::Uploaders::S3

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
CommonUploaderInterface
Defined in:
lib/bubbles/uploaders/s3.rb

Instance Method Summary collapse

Methods included from CommonUploaderInterface

included, #initialize

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
# File 'lib/bubbles/uploaders/s3.rb', line 7

def call
  File.open(uid_file, 'rb') do |file|
    s3.put_object(bucket: s3_bucket, key: s3_full_path, body: file, acl: config.s3_acl, metadata: )
  end
rescue => e
  config.logger.error("#{e.message}")
  command_queue.reschedule(self)
end

#inspectObject



16
17
18
# File 'lib/bubbles/uploaders/s3.rb', line 16

def inspect
  "<##{self.class.name} uid_file: #{uid_file} to: s3://#{s3_bucket}#{s3_full_path}>"
end