mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update Media, Profile models, fix S3 urls
This commit is contained in:
parent
8e033b3228
commit
396848b20b
2 changed files with 3 additions and 3 deletions
|
@ -34,10 +34,10 @@ class Media extends Model
|
||||||
$url = $this->remote_url;
|
$url = $this->remote_url;
|
||||||
} else {
|
} else {
|
||||||
$path = $this->media_path;
|
$path = $this->media_path;
|
||||||
$url = $this->cdn_url ?? Storage::url($path);
|
$url = $this->cdn_url ?? config('app.url') . Storage::url($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
return url($url);
|
return $url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function thumbnailUrl()
|
public function thumbnailUrl()
|
||||||
|
|
|
@ -140,7 +140,7 @@ class Profile extends Model
|
||||||
$version = hash('sha256', $avatar->change_count);
|
$version = hash('sha256', $avatar->change_count);
|
||||||
$path = "{$path}?v={$version}";
|
$path = "{$path}?v={$version}";
|
||||||
|
|
||||||
return url(Storage::url($path));
|
return config('app.url') . Storage::url($path);
|
||||||
});
|
});
|
||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
|
|
Loading…
Reference in a new issue