commit
45cea0e794
4 changed files with 10 additions and 1 deletions
|
@ -54,6 +54,7 @@ return [
|
|||
'secret' => $config['storage']['secret'],
|
||||
],
|
||||
'region' => $config['storage']['region'],
|
||||
'endpoint' => $config['storage']['endpoint'],
|
||||
'version' => 'latest',
|
||||
'@http' => ['stream' => true],
|
||||
]);
|
||||
|
|
|
@ -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'] = !empty(param($request, 'storage_endpoint')) ? param($request, 'storage_endpoint') : null;
|
||||
$config['storage']['bucket'] = param($request, 'storage_bucket');
|
||||
$config['storage']['path'] = param($request, 'storage_path');
|
||||
break;
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
<select id="storage_driver" name="storage_driver" class="form-control" required>
|
||||
<option value="local">Local Storage</option>
|
||||
<option value="ftp">FTP/FTPS</option>
|
||||
<option value="s3">Amazon AWS S3</option>
|
||||
<option value="s3">Amazon S3 (or compatible)</option>
|
||||
<option value="google-cloud">Google Cloud Storage</option>
|
||||
<option value="dropbox">Dropbox</option>
|
||||
</select>
|
||||
|
@ -101,6 +101,12 @@
|
|||
<input type="text" class="form-control hook-storage-input" id="storage_region" name="storage_region" placeholder="your-region" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row hook-storage">
|
||||
<label for="storage_region" class="col-sm-3 col-form-label">AWS S3 endpoint</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control hook-storage-input" id="storage_endpoint" name="storage_endpoint" placeholder="optional (for S3-compatible services)" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row hook-storage">
|
||||
<label for="storage_token" class="col-sm-3 col-form-label">Dropbox token</label>
|
||||
<div class="col-sm-9">
|
||||
|
|
|
@ -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").parent().parent().show();
|
||||
$('#storage_bucket').prop('required', 'required').parent().parent().show();
|
||||
break;
|
||||
case 'google-cloud':
|
||||
|
|
Loading…
Reference in a new issue