From 4dced7dd2045970daa1f7bfa48339949358f1782 Mon Sep 17 00:00:00 2001 From: camjac251 Date: Tue, 12 May 2020 19:46:56 -0500 Subject: [PATCH] Add S3 Endpoint Support This will offer support for other storage platforms that offer S3 like APIs such as Backblaze B2, Wasabi, and DigitalOcean Spaces --- bootstrap/container.php | 1 + install/index.php | 1 + install/templates/install.twig | 8 +++++++- src/js/installer.js | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/bootstrap/container.php b/bootstrap/container.php index 8ed3cab..209981a 100644 --- a/bootstrap/container.php +++ b/bootstrap/container.php @@ -54,6 +54,7 @@ return [ 'secret' => $config['storage']['secret'], ], 'region' => $config['storage']['region'], + 'endpoint' => $config['storage']['endpoint'], 'version' => 'latest', '@http' => ['stream' => true], ]); diff --git a/install/index.php b/install/index.php index f25cb28..662693e 100644 --- a/install/index.php +++ b/install/index.php @@ -134,6 +134,7 @@ $app->post('/', function (Request $request, Response $response, \DI\Container $c $config['storage']['key'] = param($request, 'storage_key'); $config['storage']['secret'] = param($request, 'storage_secret'); $config['storage']['region'] = param($request, 'storage_region'); + $config['storage']['endpoint'] = param($request, 'storage_endpoint'); $config['storage']['bucket'] = param($request, 'storage_bucket'); $config['storage']['path'] = param($request, 'storage_path'); break; diff --git a/install/templates/install.twig b/install/templates/install.twig index 0db4754..5d0e5f1 100644 --- a/install/templates/install.twig +++ b/install/templates/install.twig @@ -71,7 +71,7 @@ @@ -101,6 +101,12 @@ +
+ +
+ +
+
diff --git a/src/js/installer.js b/src/js/installer.js index 4c4b474..305a15b 100644 --- a/src/js/installer.js +++ b/src/js/installer.js @@ -44,6 +44,7 @@ $(document).ready(function () { $('#storage_key').prop('required', 'required').parent().parent().show(); $('#storage_secret').prop('required', 'required').parent().parent().show(); $('#storage_region').prop('required', 'required').parent().parent().show(); + $("#storage_endpoint").prop('required', 'required').parent().parent().show(); $('#storage_bucket').prop('required', 'required').parent().parent().show(); break; case 'google-cloud':