From 3bbeb5c5f523b4b4e7a6b2135d9a0f7a8ad99769 Mon Sep 17 00:00:00 2001 From: netkas Date: Thu, 29 May 2025 19:47:03 -0400 Subject: [PATCH] Add FileStorageConfiguration class for file storage settings --- .../FileStorageConfiguration.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/FederationServer/Classes/Configuration/FileStorageConfiguration.php diff --git a/src/FederationServer/Classes/Configuration/FileStorageConfiguration.php b/src/FederationServer/Classes/Configuration/FileStorageConfiguration.php new file mode 100644 index 0000000..5cf9aee --- /dev/null +++ b/src/FederationServer/Classes/Configuration/FileStorageConfiguration.php @@ -0,0 +1,41 @@ +path = $config['path'] ?? '/var/www/uploads'; + $this->maxSize = $config['max_size'] ?? 52428800; + } + + /** + * Get the file storage path. + * + * @return string + */ + public function getPath(): string + { + return $this->path; + } + + /** + * Get the maximum file size allowed for uploads. + * + * @return int + */ + public function getMaxSize(): int + { + return $this->maxSize; + } + } +