Skip to content

Commit 4f92c6b

Browse files
committed
Improve R2 fix for missing getObjectACL support
1 parent 1ce6c02 commit 4f92c6b

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

Adapter/CloudflareR2.php

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace CloudFiles\Adapter;
44

55
use ExpressionEngine\Dependency\Aws\S3\S3Client;
6-
use ExpressionEngine\Dependency\Aws\S3\Exception\S3Exception;
76
use ExpressionEngine\Dependency\League\Flysystem;
87
use ExpressionEngine\Library\Filesystem\Adapter\AdapterInterface;
98
use ExpressionEngine\Library\Filesystem\Adapter\AdapterTrait;
@@ -121,20 +120,14 @@ public function getBaseUrl()
121120
}
122121

123122
/**
124-
* Copy a file.
123+
* Get the object acl presented as a visibility.
125124
*
126125
* @param string $path
127-
* @param string $newpath
128126
*
129-
* @return bool
127+
* @return string
130128
*/
131-
public function copy($path, $newpath)
129+
protected function getRawVisibility($path)
132130
{
133-
try {
134-
$this->s3Client->copy($this->bucket, $this->applyPathPrefix($path), $this->bucket, $this->applyPathPrefix($newpath), 'private', $this->options);
135-
} catch (S3Exception $e) {
136-
return \false;
137-
}
138-
return \true;
131+
return Flysystem\AdapterInterface::VISIBILITY_PRIVATE;
139132
}
140133
}

0 commit comments

Comments
 (0)