mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
Update AvatarObserver, fix cloud delete bug by checking if cloud storage is enabled
This commit is contained in:
parent
25bc08adb9
commit
9f7672f570
1 changed files with 1 additions and 1 deletions
|
@ -65,7 +65,7 @@ class AvatarObserver
|
|||
@unlink($path);
|
||||
}
|
||||
|
||||
if($avatar->cdn_url) {
|
||||
if($avatar->cdn_url && config_cache('pixelfed.cloud_storage')) {
|
||||
$disk = Storage::disk(config('filesystems.cloud'));
|
||||
$base = Str::startsWith($avatar->media_path, 'cache/avatars/');
|
||||
if($base && $disk->exists($avatar->media_path)) {
|
||||
|
|
Loading…
Reference in a new issue