-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Labels
Description
We're using this via Paperclip and seeing this error on upload:
Google::Apis::ClientError
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
https://sentry.io/share/issue/393f9e2786b543be9b2061a933268129/
Our config is:
Paperclip::Attachment.default_options[:storage] = :fog
Paperclip::Attachment.default_options[:fog_directory] = ENV["GOOGLE_STORAGE_BUCKET_NAME"] || ''
Paperclip::Attachment.default_options[:path] = ":rails_root/public/system/system/:class/:attachment/:id_partition/:style/:filename"
Paperclip::Attachment.default_options[:fog_credentials] = {
provider: ENV["FOG_PROVIDER"] || "Local",
local_root: "#{Rails.root}/public",
google_project: 'public-lab' ,
google_json_key_location: ENV["GOOGLE_JSON_KEY_FILE"] || '' ,
google_storage_access_key_id: ENV["GOOGLE_STORAGE_KEY"] || '' ,
google_storage_secret_access_key: ENV["GOOGLE_STORAGE_SECRET"] || ''
}
Paperclip::Attachment.default_options[:fog_public] = true # we tried adding this line or removing it
Paperclip::Attachment.default_options[:fog_host] = ""
Has anyone seen this error? I can't find any mention of uniform bucket level access in this repository.
https://cloud.google.com/storage/docs/uniform-bucket-level-access
Thank you very much!! cc @icarito
vankatamarinov