mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update Media model, use cloud filesystem url if enabled instead of cdn_url to easily update S3 media urls
This commit is contained in:
parent
b128053d54
commit
e6bc57d7b6
2 changed files with 2 additions and 1 deletions
|
@ -38,7 +38,7 @@ class Media extends Model
|
|||
public function url()
|
||||
{
|
||||
if($this->cdn_url) {
|
||||
return $this->cdn_url;
|
||||
return Storage::disk(config('filesystems.cloud'))->url($this->media_path);
|
||||
}
|
||||
|
||||
if($this->remote_media && $this->remote_url) {
|
||||
|
|
|
@ -82,6 +82,7 @@ return [
|
|||
],
|
||||
'root' => env('DO_SPACES_ROOT',''),
|
||||
'throw' => true,
|
||||
'url' => env('AWS_URL'),
|
||||
],
|
||||
|
||||
'backup' => [
|
||||
|
|
Loading…
Reference in a new issue