Skip to content

Commit

Permalink
Merge pull request #100 from nationalarchives/fix/set-file-acl-on-copy
Browse files Browse the repository at this point in the history
Set public-read ACL on copy
  • Loading branch information
Floppy authored Apr 22, 2022
2 parents 9b71da3 + f3c897e commit a030a7c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion judgments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ def publish_documents(uri: str) -> None:

for result in response.get("Contents", []):
source = {"Bucket": private_bucket, "Key": result["Key"]}
client.copy(source, public_bucket, result["Key"])
extra_args = {"ACL": "public-read"}
client.copy(source, public_bucket, result["Key"], extra_args)


def unpublish_documents(uri: str) -> None:
Expand Down

0 comments on commit a030a7c

Please sign in to comment.