mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
Add S3 and Wasabi as storage providers (#281)
This commit is contained in:
32
app/SSH/Storage/S3AbstractStorage.php
Normal file
32
app/SSH/Storage/S3AbstractStorage.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\SSH\Storage;
|
||||
|
||||
abstract class S3AbstractStorage extends AbstractStorage
|
||||
{
|
||||
protected ?string $apiUrl = null;
|
||||
|
||||
protected ?string $bucketRegion = null;
|
||||
|
||||
public function getApiUrl(): string
|
||||
{
|
||||
return $this->apiUrl;
|
||||
}
|
||||
|
||||
public function setApiUrl(?string $region = null): void
|
||||
{
|
||||
$this->bucketRegion = $region ?? $this->bucketRegion;
|
||||
$this->apiUrl = "https://s3.{$this->bucketRegion}.amazonaws.com";
|
||||
}
|
||||
|
||||
// Getter and Setter for $bucketRegion
|
||||
public function getBucketRegion(): string
|
||||
{
|
||||
return $this->bucketRegion;
|
||||
}
|
||||
|
||||
public function setBucketRegion(string $region): void
|
||||
{
|
||||
$this->bucketRegion = $region;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user