mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
The hardcoded connection timeout of 5 seconds may not be enough in some cases, so now it is got from the ObjectStore arguments in Nextcloud configuration, falling back to 5 if not set. The connection timeout is set in seconds, but decimal precision can be used for subsecond accuracy (for example, 4.2 for 4200 milliseconds). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
41 lines
1 KiB
PHP
41 lines
1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/**
|
|
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
namespace OC\Files\ObjectStore;
|
|
|
|
/**
|
|
* Shared configuration between ConnectionTrait and ObjectTrait to ensure both to be in sync
|
|
*/
|
|
trait S3ConfigTrait {
|
|
protected array $params;
|
|
|
|
protected string $bucket;
|
|
|
|
/** Maximum number of concurrent multipart uploads */
|
|
protected int $concurrency;
|
|
|
|
/** Timeout, in seconds, for the connection to S3 server, not for the
|
|
* request. */
|
|
protected float $connectTimeout;
|
|
|
|
protected int $timeout;
|
|
|
|
protected string|false $proxy;
|
|
|
|
protected string $storageClass;
|
|
|
|
/** @var int Part size in bytes (float is added for 32bit support) */
|
|
protected int|float $uploadPartSize;
|
|
|
|
/** @var int Limit on PUT in bytes (float is added for 32bit support) */
|
|
private int|float $putSizeLimit;
|
|
|
|
/** @var int Limit on COPY in bytes (float is added for 32bit support) */
|
|
private int|float $copySizeLimit;
|
|
|
|
private bool $useMultipartCopy = true;
|
|
}
|