File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
lib/fog/storage/google_json/models Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ class File < Fog::Model
5
5
identity :key , :aliases => [ "Key" , :name ]
6
6
7
7
attribute :acl
8
+ attribute :uniform
8
9
attribute :predefined_acl , :aliases => [ "predefinedAcl" , :predefined_acl ]
9
10
attribute :cache_control , :aliases => [ "cacheControl" , :cache_control ]
10
11
attribute :content_disposition , :aliases => [ "contentDisposition" , :content_disposition ]
@@ -37,6 +38,10 @@ class File < Fog::Model
37
38
"publicReadWrite"
38
39
] . freeze
39
40
41
+ def uniform = ( enable )
42
+ @uniform = enable
43
+ end
44
+
40
45
def predefined_acl = ( new_predefined_acl )
41
46
unless VALID_PREDEFINED_ACLS . include? ( new_predefined_acl )
42
47
raise ArgumentError . new ( "acl must be one of [#{ VALID_PREDEFINED_ACLS . join ( ', ' ) } ]" )
@@ -111,8 +116,8 @@ def save
111
116
FILE_INSERTABLE_FIELDS . map { |k | [ k , attributes [ k ] ] }
112
117
. reject { |pair | pair [ 1 ] . nil? }
113
118
]
114
-
115
- options [ :predefined_acl ] ||= @predefined_acl
119
+
120
+ options [ :predefined_acl ] ||= @predefined_acl unless @uniform
116
121
117
122
service . put_object ( directory . key , key , body , **options )
118
123
self . content_length = Fog ::Storage . get_body_size ( body )
You can’t perform that action at this time.
0 commit comments