@@ 86-96 (lines=11) @@ | ||
83 | /** |
|
84 | * {@inheritdoc} |
|
85 | */ |
|
86 | public function update($path, $contents, Config $config) |
|
87 | { |
|
88 | if (!$config->has('visibility') && !$config->has('ACL')) { |
|
89 | // 新文件未配置权限情况下,继承旧文件权限 |
|
90 | $config->set(AliyunOssUtil::$metaMap['ACL'], $this->getObjectACL($path)); |
|
91 | } |
|
92 | // 允许覆盖同名文件 |
|
93 | $config->set('x-oss-forbid-overwrite', 'false'); |
|
94 | ||
95 | return $this->write($path, $contents, $config); |
|
96 | } |
|
97 | ||
98 | /** |
|
99 | * {@inheritdoc} |
|
@@ 101-111 (lines=11) @@ | ||
98 | /** |
|
99 | * {@inheritdoc} |
|
100 | */ |
|
101 | public function updateStream($path, $resource, Config $config) |
|
102 | { |
|
103 | if (!$config->has('visibility') && !$config->has('ACL')) { |
|
104 | // 新文件未配置权限情况下,继承旧文件权限 |
|
105 | $config->set(AliyunOssUtil::$metaMap['ACL'], $this->getObjectACL($path)); |
|
106 | } |
|
107 | // 允许覆盖同名文件 |
|
108 | $config->set('x-oss-forbid-overwrite', 'false'); |
|
109 | ||
110 | return $this->writeStream($path, $resource, $config); |
|
111 | } |
|
112 | ||
113 | /** |
|
114 | * {@inheritdoc} |