From 4e8facc4a0e4403491f53b51a87b48f54a6f8335 Mon Sep 17 00:00:00 2001 From: Anderson Entwistle Date: Thu, 2 Mar 2023 23:05:22 -0500 Subject: [PATCH] feat: add env var for S3 storage class Signed-off-by: Anderson Entwistle <46688047+aentwist@users.noreply.github.com> --- .config/s3.config.php | 1 + README.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.config/s3.config.php b/.config/s3.config.php index 6d0ede91..948ecf53 100644 --- a/.config/s3.config.php +++ b/.config/s3.config.php @@ -12,6 +12,7 @@ if (getenv('OBJECTSTORE_S3_BUCKET')) { 'region' => getenv('OBJECTSTORE_S3_REGION') ?: '', 'hostname' => getenv('OBJECTSTORE_S3_HOST') ?: '', 'port' => getenv('OBJECTSTORE_S3_PORT') ?: '', + 'storageClass' => getenv('OBJECTSTORE_S3_STORAGE_CLASS') ?: 'STANDARD', 'objectPrefix' => getenv("OBJECTSTORE_S3_OBJECT_PREFIX") ? getenv("OBJECTSTORE_S3_OBJECT_PREFIX") : "urn:oid:", 'autocreate' => (strtolower($autocreate) === 'false' || $autocreate == false) ? false : true, 'use_ssl' => (strtolower($use_ssl) === 'false' || $use_ssl == false) ? false : true, diff --git a/README.md b/README.md index 20a9cecf..ccf43775 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,7 @@ To use an external S3 compatible object store as primary storage, set the follow - `OBJECTSTORE_S3_PORT`: The port that the object storage server is being served over - `OBJECTSTORE_S3_SSL` (default: `true`): Whether or not SSL/TLS should be used to communicate with object storage server - `OBJECTSTORE_S3_REGION`: The region that the S3 bucket resides in. +- `OBJECTSTORE_S3_STORAGE_CLASS` (since Nextcloud 26, default: `STANDARD`): The storage class to apply to all objects stored. See S3 [`--storage-class`](https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html#options). - `OBJECTSTORE_S3_USEPATH_STYLE` (default: `false`): Not required for AWS S3 - `OBJECTSTORE_S3_LEGACYAUTH` (default: `false`): Not required for AWS S3 - `OBJECTSTORE_S3_OBJECT_PREFIX` (default: `urn:oid:`): Prefix to prepend to the fileid