title: Uploading png images to GCS in R - can upload individually, but cannot upload entire directory
body: <p>We have a local directory with 20000 images that needs to go to GCS. Using R (and <code>googleCloudStorageR</code>), we can loop over each of the images and upload to GCS as such:</p>
  <pre><code># setup
  library(googleCloudStorageR)
  gcs_auth(json_file = 'my/gcs/admin/creds.json')
  all_png_images &lt;- list.files('../path/to/local-images/directory')
  
  # and loop
  for(i in 1:length(all_png_images)) {
      googleCloudStorageR::gcs_upload(
        file = paste0(base_url, all_png_images[i]),
        bucket = 'my-bucket',
        name = paste0('images-folder/', all_png_images[i]),
        predefinedAcl = 'default'
      )
  }
  </code></pre>
  <p>and this works perfectly... however, it would be much better if I could simply point to the directory and upload all at once, rather than have to point to a directory and loop over each file. I have tried to use the <code>gcs_save_all</code> function, to no success:</p>
  <pre><code>googleCloudStorageR::gcs_save_all(
    directory = 'path-to-all-images',
    bucket = 'my-bucket'
  )
  </code></pre>
  <p>throws the error <code>2020-10-01 16:23:47 -- File size detected as 377.1 Kb 2020-10-01 16:23:47&gt; Request Status Code: 400 Error: API returned: Cannot insert legacy ACL for an object when uniform bucket-level access is enabled. Read more at https://cloud.google.com/storage/docs/uniform-bucket-level-access</code></p>
  <p>I am trying to find out why <code>gcs_save_all</code> is not working, or if there is another way I can do this in R.</p>