class
MartenRailsBridge::ActiveStorage::Representations::StoredKeysService
- MartenRailsBridge::ActiveStorage::Representations::StoredKeysService
- ActiveStorage::Service::S3Service
- ActiveStorage::Service
- Reference
- Object
Overview
An S3 service answering #exist? with a flag instead of asking a server.
The handler probes for the derived-key object before it processes anything. The tests below assert
the redirect rather than the transform, so the flag stands in for the object an untracked Rails
app wrote, and RedirectHandlerProcessingTest covers what happens when nothing is there.
Everything else these tests read is a presigned URL, which is built locally, which is why the
endpoint needs nothing listening on it.
:nodoc:
Defined in:
active_storage/representations/redirect_handler_test.crInstance Method Summary
-
#exist?(key : String) : Bool
Returns
truewhen an object is stored atkey. - #stored=(stored : Bool)
- #stored? : Bool
Instance methods inherited from class ActiveStorage::Service::S3Service
delete(key : String) : Nil
delete,
delete_prefixed(prefix : String) : Nil
delete_prefixed,
download(key : String) : Stringdownload(key : String, & : Bytes -> ) : Nil download, download_chunk(key : String, range : Range(Int64, Int64)) : String download_chunk, exist?(key : String) : Bool exist?, private_url(key : String, expires_in : Time::Span, filename : ActiveStorage::Filename, disposition : String, content_type : String) private_url, public_url(key : String, filename : ActiveStorage::Filename, content_type : String, disposition : String) public_url, upload(key : String, io : IO, checksum : String | Nil = nil, filename : ActiveStorage::Filename | Nil = nil, content_type : String | Nil = nil, disposition : String | Nil = nil) : Nil upload
Constructor methods inherited from class ActiveStorage::Service::S3Service
new(access_key_id : String, secret_access_key : String, endpoint : Nil | String, bucket : String, region : String = "unused", force_path_style : Bool = false)
new
Instance methods inherited from class ActiveStorage::Service
content_disposition_with(filename : Filename, type : String | Nil = "inline") : String
content_disposition_with,
delete(key : String) : Nil
delete,
delete_prefixed(prefix : String) : Nil
delete_prefixed,
download(key : String) : Stringdownload(key : String, & : Bytes -> ) : Nil download, download_chunk(key : String, range : Range(Int64, Int64)) : String download_chunk, exist?(key : String) : Bool exist?, private_url(key : String, expires_in : Time::Span, filename : Filename, disposition : String, content_type : String) private_url, public? : Bool public?, public_url(key : String, filename : Filename, content_type : String, disposition : String) public_url, upload(key : String, io : IO, checksum : String | Nil = nil, filename : Filename | Nil = nil, content_type : String | Nil = nil, disposition : String | Nil = nil) : Nil upload, url(key : String, expires_in : Time::Span, filename : Filename, content_type : String, disposition : String) url
Constructor methods inherited from class ActiveStorage::Service
new
new
Instance Method Detail
def exist?(key : String) : Bool
#
Description copied from class ActiveStorage::Service::S3Service
Returns true when an object is stored at key.
https://github.com/rails/rails/blob/v8.1.3/activestorage/lib/active_storage/service/s3_service.rb