diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php index 384e9f0ff58c9..ec06b5920d757 100644 --- a/lib/private/Files/ObjectStore/S3ObjectTrait.php +++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php @@ -9,6 +9,7 @@ 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; @@ -266,8 +267,11 @@ public function deleteObject($urn) { ]); } + /** + * @throws S3Exception|\Exception if there is an unhandled exception + */ public function objectExists($urn) { - return $this->getConnection()->doesObjectExist($this->bucket, $urn, $this->getSSECParameters()); + return $this->getConnection()->doesObjectExistV2($this->bucket, $urn, false, $this->getSSECParameters()); } public function copyObject($from, $to, array $options = []) {