Class: Resizing::ActiveStorage::Service::ResizingService
- Inherits:
-
ActiveStorage::Service
- Object
- ActiveStorage::Service
- Resizing::ActiveStorage::Service::ResizingService
- Defined in:
- lib/resizing/active_storage/service/resizing_service.rb
Overview
ref. https://github.com/rails/rails/blob/master/activestorage/lib/active_storage/service/s3_service.rb
rubocop:disable Metrics/ParameterLists
Instance Method Summary collapse
- #delete(_key) ⇒ Object
- #download(_key) ⇒ Object
- #download_chunk(_key, _range) ⇒ Object
- #exist?(_key) ⇒ Boolean
- #headers_for_direct_upload(_key, content_type:, checksum:, filename: nil, disposition: nil) ⇒ Object
-
#initialize ⇒ ResizingService
constructor
def initialize(bucket:, upload: {}, public: false, **options) rubocop:disable Lint/MissingSuper.
-
#upload(_key, _io, checksum: nil, filename: nil, content_type: nil, disposition: nil) ⇒ Object
rubocop:enable Lint/MissingSuper.
- #url_for_direct_upload(_key, expires_in:, content_type:, conteont_length:, checksum:) ⇒ Object
Constructor Details
#initialize ⇒ ResizingService
def initialize(bucket:, upload: {}, public: false, **options) rubocop:disable Lint/MissingSuper
15 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 15 def initialize; end |
Instance Method Details
#delete(_key) ⇒ Object
30 31 32 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 30 def delete(_key) raise NotImplementedError, 'delete is not implemented' end |
#download(_key) ⇒ Object
22 23 24 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 22 def download(_key) raise NotImplementedError, 'download is not implemented' end |
#download_chunk(_key, _range) ⇒ Object
26 27 28 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 26 def download_chunk(_key, _range) raise NotImplementedError, 'download_chunk is not implemented' end |
#exist?(_key) ⇒ Boolean
34 35 36 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 34 def exist?(_key) raise NotImplementedError, 'exist? is not implemented' end |
#headers_for_direct_upload(_key, content_type:, checksum:, filename: nil, disposition: nil) ⇒ Object
42 43 44 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 42 def headers_for_direct_upload(_key, content_type:, checksum:, filename: nil, disposition: nil, **) raise NotImplementedError, 'headers_for_direct_upload is not implemented' end |
#upload(_key, _io, checksum: nil, filename: nil, content_type: nil, disposition: nil) ⇒ Object
rubocop:enable Lint/MissingSuper
18 19 20 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 18 def upload(_key, _io, checksum: nil, filename: nil, content_type: nil, disposition: nil, **) raise NotImplementedError, 'upload is not implemented' end |
#url_for_direct_upload(_key, expires_in:, content_type:, conteont_length:, checksum:) ⇒ Object
38 39 40 |
# File 'lib/resizing/active_storage/service/resizing_service.rb', line 38 def url_for_direct_upload(_key, expires_in:, content_type:, conteont_length:, checksum:) raise NotImplementedError, 'url_for_direct_upload is not implemented' end |