Skip to content

Commit

Permalink
fix(s3): DigitalOcean storage buckets do not work
Browse files Browse the repository at this point in the history
  • Loading branch information
peaklabs-dev committed Jan 25, 2025
1 parent 91d90cc commit 12c7ee2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
5 changes: 0 additions & 5 deletions app/Models/S3Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public function awsUrl()
return "{$this->endpoint}/{$this->bucket}";
}

public function isDigitalOcean()
{
return str($this->endpoint)->contains('digitaloceanspaces.com');
}

public function testConnection(bool $shouldSave = false)
{
try {
Expand Down
1 change: 0 additions & 1 deletion bootstrap/helpers/databases.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ function deleteBackupsS3(string|array|null $filenames, S3Storage $s3): void
'bucket' => $s3->bucket,
'endpoint' => $s3->endpoint,
'use_path_style_endpoint' => true,
'bucket_endpoint' => $s3->isDigitalOcean(),
'aws_url' => $s3->awsUrl(),
]);

Expand Down
3 changes: 0 additions & 3 deletions bootstrap/helpers/s3.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

function set_s3_target(S3Storage $s3)
{
$is_digital_ocean = false;

config()->set('filesystems.disks.custom-s3', [
'driver' => 's3',
'region' => $s3['region'],
Expand All @@ -14,7 +12,6 @@ function set_s3_target(S3Storage $s3)
'bucket' => $s3['bucket'],
'endpoint' => $s3['endpoint'],
'use_path_style_endpoint' => true,
'bucket_endpoint' => $s3->isDigitalOcean(),
'aws_url' => $s3->awsUrl(),
]);
}

0 comments on commit 12c7ee2

Please sign in to comment.