@@ 191-201 (lines=11) @@ | ||
188 | /** |
|
189 | * {@inheritdoc} |
|
190 | */ |
|
191 | public function update($path, $contents, Config $config) |
|
192 | { |
|
193 | if (!$config->has('visibility') && !$config->has('ACL')) { |
|
194 | // 新文件未配置权限情况下,继承旧文件权限 |
|
195 | $config->set(static::$metaMap['ACL'], $this->getObjectACL($path)); |
|
196 | } |
|
197 | // 允许覆盖同名文件 |
|
198 | $config->set('x-oss-forbid-overwrite','false'); |
|
199 | ||
200 | return $this->write($path, $contents, $config); |
|
201 | } |
|
202 | ||
203 | /** |
|
204 | * {@inheritdoc} |
|
@@ 206-216 (lines=11) @@ | ||
203 | /** |
|
204 | * {@inheritdoc} |
|
205 | */ |
|
206 | public function updateStream($path, $resource, Config $config) |
|
207 | { |
|
208 | if (!$config->has('visibility') && !$config->has('ACL')) { |
|
209 | // 新文件未配置权限情况下,继承旧文件权限 |
|
210 | $config->set(static::$metaMap['ACL'], $this->getObjectACL($path)); |
|
211 | } |
|
212 | // 允许覆盖同名文件 |
|
213 | $config->set('x-oss-forbid-overwrite','false'); |
|
214 | ||
215 | return $this->writeStream($path, $resource, $config); |
|
216 | } |
|
217 | ||
218 | /** |
|
219 | * {@inheritdoc} |