Skip to content

Commit c4e9c0a

Browse files
committed
Better S3 backup generation support
1 parent 3e04540 commit c4e9c0a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/Extensions/Backups/BackupManager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
namespace Pterodactyl\Extensions\Backups;
44

55
use Closure;
6+
use Aws\S3\S3Client;
67
use Illuminate\Support\Arr;
78
use Illuminate\Support\Str;
89
use Webmozart\Assert\Assert;
910
use InvalidArgumentException;
10-
use Aws\S3\S3MultiRegionClient;
1111
use League\Flysystem\AdapterInterface;
1212
use League\Flysystem\AwsS3v3\AwsS3Adapter;
1313
use League\Flysystem\Memory\MemoryAdapter;
@@ -160,7 +160,7 @@ public function createS3Adapter(array $config)
160160
$config['credentials'] = Arr::only($config, ['key', 'secret', 'token']);
161161
}
162162

163-
$client = new S3MultiRegionClient($config);
163+
$client = new S3Client($config);
164164

165165
return new AwsS3Adapter($client, $config['bucket'], $config['prefix'] ?? '', $config['options'] ?? []);
166166
}

app/Services/Backups/InitiateBackupService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected function getS3PresignedUrl(string $path)
154154
$client->getCommand('PutObject', [
155155
'Bucket' => $adapter->getBucket(),
156156
'Key' => $path,
157-
'ContentType' => 'binary/octet-stream',
157+
'ContentType' => 'application/x-gzip',
158158
]),
159159
CarbonImmutable::now()->addMinutes(30)
160160
);

0 commit comments

Comments
 (0)