Support configuring storage class for S3 backup uploads (#4399)
Closes <https://github.com/pterodactyl/panel/issues/4072>
This commit is contained in:
parent
6aede6b63d
commit
44598bf724
2 changed files with 7 additions and 0 deletions
|
@ -82,6 +82,11 @@ class BackupRemoteUploadController extends Controller
|
||||||
'ContentType' => 'application/x-gzip',
|
'ContentType' => 'application/x-gzip',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$storageClass = config('backups.disks.s3.storage_class');
|
||||||
|
if (!is_null($storageClass)) {
|
||||||
|
$params['StorageClass'] = $storageClass;
|
||||||
|
}
|
||||||
|
|
||||||
// Execute the CreateMultipartUpload request
|
// Execute the CreateMultipartUpload request
|
||||||
$result = $client->execute($client->getCommand('CreateMultipartUpload', $params));
|
$result = $client->execute($client->getCommand('CreateMultipartUpload', $params));
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,8 @@ return [
|
||||||
'endpoint' => env('AWS_ENDPOINT'),
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||||
'use_accelerate_endpoint' => env('AWS_BACKUPS_USE_ACCELERATE', false),
|
'use_accelerate_endpoint' => env('AWS_BACKUPS_USE_ACCELERATE', false),
|
||||||
|
|
||||||
|
'storage_class' => env('AWS_BACKUPS_STORAGE_CLASS'),
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue