aws.s3 icon indicating copy to clipboard operation
aws.s3 copied to clipboard

`put_acl` zeros out file

Open corkyjones opened this issue 7 years ago • 3 comments

put_acl places the correct acl on a file, however, the new size of the file is 0. I am thinking that the put is overwriting the file and placing the correct acl.

image

put_acl(object = 'picture.jpg',
             bucket = 'mybucket',
             acl = 'public-read')

image

corkyjones avatar Sep 24 '18 20:09 corkyjones

@jmorten would you mind sharing your code? I have so far been unable to get the new ACL to stick

stevecondylios avatar Oct 09 '19 05:10 stevecondylios

I'm having the exact same issue. Was this ever resolved?

Appreciate any help!

PMLPA95 avatar Apr 02 '20 18:04 PMLPA95

Confirming I'm also having the same issue.

My code is something like this:

# write data frame as csv file
aws.s3::s3write_using(
  x = mtcars,
  FUN = readr::write_csv,
  object = "subdir/mtcars.csv",
  bucket = "mybucket",
  na = ""
)

# confirm file size: 5201810
aws.s3::object_size(
  object = "subdir/mtcars.csv", 
  bucket = "mybucket"
)

# give everyone read permission
aws.s3::put_acl(
  object = "subdir/mtcars.csv",
  bucket = "mybucket",
  acl = "public-read"
)

# check file size: 0
aws.s3::object_size(
  object = "subdir/mtcars.csv", 
  bucket = "mybucket"
)

k5cents avatar Sep 03 '20 17:09 k5cents