Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-04-15 18:14:57 +0300
committerRobin Appelman <robin@icewind.nl>2021-04-21 16:25:58 +0300
commiteffb7dc8ba00c683e3b6717eaf1f358ce1c69b87 (patch)
tree6d9aa4d783242e56f2f971da6d74d05f66894d1e /tests/lib/Files
parentd2ea068552eb144d491b76e0a0ef8266144dcf45 (diff)
set mimetype for objects uploaded to object storages
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Files')
-rw-r--r--tests/lib/Files/ObjectStore/FailDeleteObjectStore.php4
-rw-r--r--tests/lib/Files/ObjectStore/FailWriteObjectStore.php2
-rw-r--r--tests/lib/Files/ObjectStore/S3Test.php2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php
index c755657faff..5160abe574f 100644
--- a/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php
+++ b/tests/lib/Files/ObjectStore/FailDeleteObjectStore.php
@@ -40,8 +40,8 @@ class FailDeleteObjectStore implements IObjectStore {
return $this->objectStore->readObject($urn);
}
- public function writeObject($urn, $stream) {
- return $this->objectStore->writeObject($urn, $stream);
+ public function writeObject($urn, $stream, string $mimetype = null) {
+ return $this->objectStore->writeObject($urn, $stream, $mimetype);
}
public function deleteObject($urn) {
diff --git a/tests/lib/Files/ObjectStore/FailWriteObjectStore.php b/tests/lib/Files/ObjectStore/FailWriteObjectStore.php
index b9c8751fda3..559d004cd0c 100644
--- a/tests/lib/Files/ObjectStore/FailWriteObjectStore.php
+++ b/tests/lib/Files/ObjectStore/FailWriteObjectStore.php
@@ -40,7 +40,7 @@ class FailWriteObjectStore implements IObjectStore {
return $this->objectStore->readObject($urn);
}
- public function writeObject($urn, $stream) {
+ public function writeObject($urn, $stream, string $mimetype = null) {
// emulate a failed write that didn't throw an error
return true;
}
diff --git a/tests/lib/Files/ObjectStore/S3Test.php b/tests/lib/Files/ObjectStore/S3Test.php
index c1e7948e3c4..97814212382 100644
--- a/tests/lib/Files/ObjectStore/S3Test.php
+++ b/tests/lib/Files/ObjectStore/S3Test.php
@@ -25,7 +25,7 @@ use Icewind\Streams\Wrapper;
use OC\Files\ObjectStore\S3;
class MultiPartUploadS3 extends S3 {
- public function writeObject($urn, $stream) {
+ public function writeObject($urn, $stream, string $mimetype = null) {
$this->getConnection()->upload($this->bucket, $urn, $stream, 'private', [
'mup_threshold' => 1,
]);