kjvarga / sitemap_generator

SitemapGenerator is a framework-agnostic XML Sitemap generator written in Ruby with automatic Rails integration. It supports Video, News, Image, Mobile, PageMap and Alternate Links sitemap extensions and includes Rake tasks for managing your sitemaps, as well as many other great features.
MIT License
2.44k stars 276 forks source link

GoogleStorageAdapter - Can't create sitemap on buckets with uniform bucket-level access enabled #396

Closed tkhsh closed 2 years ago

tkhsh commented 2 years ago

When sitemap files are uploaded to Google Cloud Storage and uniform bucket-level access is enabled on the bucket, the following error occurs.

Google::Cloud::InvalidArgumentError: invalid: 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

Currently, sitemap_generator always grants an ACL when creating a sitemap object, so it would be nice to specify an option that allows to create an object without an ACL.

andrewchen5678 commented 2 years ago

+1 just encountered this issue

kjvarga commented 2 years ago

@tkhsh @andrewchen5678 v6.3.0 allows you to configure the acl option. Could you try specifying acl: nil in the options to disable acl being set? If that doesn't work, we probably just need to compress the options we send to upload_file to remove nil options. If you could confirm that it would be helpful. Thanks.

tkhsh commented 2 years ago

@kjvarga I tried uploading with acl: nil and it was successful. Thank you.