Skip to content

Commit

Permalink
hourlies are read only
Browse files Browse the repository at this point in the history
  • Loading branch information
conbrad committed Apr 29, 2024
1 parent 11bfd41 commit 3392a2c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/app/routers/sfms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
prefix="/sfms",
)

SFMS_HOURLIES_PERMISSIONS = 'public-read'

class FileLikeObject(io.IOBase):
""" Very basic wrapper of the SpooledTemporaryFile to expose the file-like object interface.
Expand Down Expand Up @@ -137,6 +138,7 @@ async def upload_hourlies(file: UploadFile,
meta_data = get_meta_data(request)
await client.put_object(Bucket=bucket,
Key=key,
ACL=SFMS_HOURLIES_PERMISSIONS,
Body=FileLikeObject(file.file),
Metadata=meta_data)
logger.info('Done uploading file')
Expand Down

0 comments on commit 3392a2c

Please sign in to comment.