The gcs_upload() function uses the predefinedAcl argument to specify ACL for the file being uploaded. The gcs_save() function relies on the gcs_upload() function, but at the moment it does not allow specifying ACL for the file.
This means that gcs_save() can fail for buckets set to “uniform” access control. Of course, this issue may be circumvented by setting the bucket’s access control to “fine-grained”, or by saving locally and then using gcs_upload(), but exposing the predefinedAcl argument of the underlying gcs_upload() would be a neater solution.
The
gcs_upload()
function uses thepredefinedAcl
argument to specify ACL for the file being uploaded. Thegcs_save()
function relies on thegcs_upload()
function, but at the moment it does not allow specifying ACL for the file.This means that
gcs_save()
can fail for buckets set to “uniform” access control. Of course, this issue may be circumvented by setting the bucket’s access control to “fine-grained”, or by saving locally and then usinggcs_upload()
, but exposing thepredefinedAcl
argument of the underlyinggcs_upload()
would be a neater solution.