Files
coolify/bootstrap/helpers/s3.php
Andras Bacsai dd782e75f5 fix: local dev s3 uploads
fix: hetzner s3 uploads (mc alias instead of mc host)
2024-10-02 11:45:30 +02:00

21 lines
517 B
PHP

<?php
use App\Models\S3Storage;
function set_s3_target(S3Storage $s3)
{
$is_digital_ocean = false;
config()->set('filesystems.disks.custom-s3', [
'driver' => 's3',
'region' => $s3['region'],
'key' => $s3['key'],
'secret' => $s3['secret'],
'bucket' => $s3['bucket'],
'endpoint' => $s3['endpoint'],
'use_path_style_endpoint' => true,
'bucket_endpoint' => $s3->isHetzner() || $s3->isDigitalOcean(),
'aws_url' => $s3->awsUrl(),
]);
}