bingo: store photos in their own bucket
The bingo photos sat under bingo/ in the invoice bucket. Store them in BINGO_S3_BUCKET (datacenterbingo-photos in prod, created and pre-filled by the storage repo with the same keys) and fall back to S3_BUCKET when unset, so dev and tests need nothing new. Assisted-by: Claude:opus-5
This commit is contained in:
parent
849980042e
commit
f1ceb4efc7
5 changed files with 28 additions and 10 deletions
|
|
@ -30,7 +30,7 @@ module S3
|
|||
ENV.fetch('S3_BUCKET')
|
||||
end
|
||||
|
||||
def put(key, bytes, content_type: 'application/pdf')
|
||||
def put(key, bytes, content_type: 'application/pdf', bucket: self.bucket)
|
||||
client.put_object(
|
||||
bucket: bucket,
|
||||
key: key,
|
||||
|
|
@ -40,7 +40,7 @@ module S3
|
|||
key
|
||||
end
|
||||
|
||||
def get(key)
|
||||
def get(key, bucket: self.bucket)
|
||||
client.get_object(bucket: bucket, key: key).body.read.b # body is a UTF-8 StringIO
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue