mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #58840 from nextcloud/jtr/fix-ObjectStore-S3-doesObjectExistV2
fix(ObjectStore/S3): switch to more reliable doesObjectExistV2
This commit is contained in:
commit
d32cae3e68
1 changed files with 5 additions and 1 deletions
|
|
@ -9,6 +9,7 @@ namespace OC\Files\ObjectStore;
|
|||
use Aws\Command;
|
||||
use Aws\Exception\AwsException;
|
||||
use Aws\Exception\MultipartUploadException;
|
||||
use Aws\S3\Exception\S3Exception;
|
||||
use Aws\S3\Exception\S3MultipartUploadException;
|
||||
use Aws\S3\MultipartCopy;
|
||||
use Aws\S3\MultipartUploader;
|
||||
|
|
@ -267,8 +268,11 @@ trait S3ObjectTrait {
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws S3Exception|\Exception if there is an unhandled exception
|
||||
*/
|
||||
public function objectExists($urn) {
|
||||
return $this->getConnection()->doesObjectExist($this->bucket, $urn, $this->getServerSideEncryptionParameters());
|
||||
return $this->getConnection()->doesObjectExistV2($this->bucket, $urn, false, $this->getServerSideEncryptionParameters());
|
||||
}
|
||||
|
||||
public function copyObject($from, $to, array $options = []) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue