Support configuring storage class for S3 backup uploads (#4399)

Closes <https://github.com/pterodactyl/panel/issues/4072>
This commit is contained in:
Matthew Penner 2022-10-04 19:39:25 -06:00 committed by GitHub
parent 6aede6b63d
commit 44598bf724
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -82,6 +82,11 @@ class BackupRemoteUploadController extends Controller
'ContentType' => 'application/x-gzip',
];
$storageClass = config('backups.disks.s3.storage_class');
if (!is_null($storageClass)) {
$params['StorageClass'] = $storageClass;
}
// Execute the CreateMultipartUpload request
$result = $client->execute($client->getCommand('CreateMultipartUpload', $params));

View file

@ -59,6 +59,8 @@ return [
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'use_accelerate_endpoint' => env('AWS_BACKUPS_USE_ACCELERATE', false),
'storage_class' => env('AWS_BACKUPS_STORAGE_CLASS'),
],
],
];