summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-10-11 15:59:53 +0200
committerRobin Appelman <robin@icewind.nl>2017-10-11 15:59:53 +0200
commite393b3553eb5ad867b34f3fdc029a1887bcd3980 (patch)
tree95e035c4d7695d9bf516c81e432baf0d3c7c5e0a /lib/private
parent385d6f098c1466608d1a87312b208bbf22abeb0d (diff)
downloadnextcloud-server-e393b3553eb5ad867b34f3fdc029a1887bcd3980.tar.gz
nextcloud-server-e393b3553eb5ad867b34f3fdc029a1887bcd3980.zip
set s3 part size to 500mb
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/ObjectStore/S3ObjectTrait.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Files/ObjectStore/S3ObjectTrait.php b/lib/private/Files/ObjectStore/S3ObjectTrait.php
index 93204896c1c..2cbe20d9801 100644
--- a/lib/private/Files/ObjectStore/S3ObjectTrait.php
+++ b/lib/private/Files/ObjectStore/S3ObjectTrait.php
@@ -26,7 +26,7 @@ use Aws\S3\MultipartUploader;
use Aws\S3\S3Client;
use Psr\Http\Message\StreamInterface;
-const S3_UPLOAD_PART_SIZE = 5368709120;
+const S3_UPLOAD_PART_SIZE = 524288000; // 500MB
trait S3ObjectTrait {
/**
@@ -86,6 +86,7 @@ trait S3ObjectTrait {
$uploader = new MultipartUploader($this->getConnection(), $stream, [
'bucket' => $this->bucket,
'key' => $urn,
+ 'part_size' => S3_UPLOAD_PART_SIZE
]);
$tries = 0;
@@ -94,6 +95,7 @@ trait S3ObjectTrait {
try {
$result = $uploader->upload();
} catch (MultipartUploadException $e) {
+ \OC::$server->getLogger()->logException($e);
rewind($stream);
$tries++;