Module: UberS3::Operation::Object::ContentType::InstanceMethods

Defined in:
lib/uber-s3/operation/object/content_type.rb

Instance Method Summary collapse

Instance Method Details

#infer_content_type!Object



18
19
20
21
22
23
# File 'lib/uber-s3/operation/object/content_type.rb', line 18

def infer_content_type!
  mime_type = MIME::Types.type_for(key).first

  self.content_type ||= mime_type.content_type if mime_type
  self.content_type ||= 'binary/octet-stream'
end