From 81d6c9ea5d281b893000fabfe3f4d8e496842584 Mon Sep 17 00:00:00 2001 From: Damodar Lohani Date: Mon, 14 Jun 2021 17:23:56 +0545 Subject: [PATCH] adapter credentials field --- app/config/collections.php | 10 ++++++++++ src/Appwrite/Utopia/Response/Model/Bucket.php | 6 ++++++ 2 files changed, 16 insertions(+) diff --git a/app/config/collections.php b/app/config/collections.php index d8268cb35c..3b28dd368d 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -1479,6 +1479,16 @@ $collections = [ 'required' => true, 'array' => false, ], + [ + '$collection' => Database::SYSTEM_COLLECTION_RULES, + 'label' => 'Adapter Crednetials', + 'key' => 'adapterCredentials', + 'type' => Database::SYSTEM_VAR_TYPE_TEXT, + 'default' => '', + 'required' => false, + 'array' => false, + 'filter' => ['json'] + ], [ '$collection' => Database::SYSTEM_COLLECTION_RULES, 'label' => 'Maximum File Size', diff --git a/src/Appwrite/Utopia/Response/Model/Bucket.php b/src/Appwrite/Utopia/Response/Model/Bucket.php index d229a29fcc..e64d4d3b9a 100644 --- a/src/Appwrite/Utopia/Response/Model/Bucket.php +++ b/src/Appwrite/Utopia/Response/Model/Bucket.php @@ -48,6 +48,12 @@ class Bucket extends Model 'default' => '', 'example' => 'local', ]) + ->addRule('adapterCredentials', [ + 'type' => self::TYPE_STRING, + 'description' => 'Storage adapter credentials.', + 'default' => '', + 'example' => ['key' => 'value'], + ]) ->addRule('maximumFileSize', [ 'type' => self::TYPE_INTEGER, 'description' => 'Maximum file size supported.',