Class: Service::BetterS3Service

Inherits:
S3Service
  • Object
show all
Defined in:
lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb

Overview

Adds handling of path-prefixes to S3 Adapted from: github.com/rails/rails/issues/32790

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, upload: {}, **options) ⇒ BetterS3Service

Returns a new instance of BetterS3Service.



14
15
16
17
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 14

def initialize(bucket:, upload: {}, **options)
  @root = options.delete(:root)
  super(bucket: bucket, upload: upload, **options)
end

Instance Attribute Details

#bucketObject (readonly)

Returns the value of attribute bucket.



12
13
14
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12

def bucket
  @bucket
end

#clientObject (readonly)

Returns the value of attribute client.



12
13
14
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12

def client
  @client
end

#rootObject (readonly)

Returns the value of attribute root.



12
13
14
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12

def root
  @root
end

#upload_optionsObject (readonly)

Returns the value of attribute upload_options.



12
13
14
# File 'lib/generators/rockstart/storage/active_storage/templates/better_s3_service.rb', line 12

def upload_options
  @upload_options
end