소스 검색

Update AvatarObserver, fix cloud delete bug by checking if cloud storage is enabled

Daniel Supernault 2 년 전
부모
커밋
9f7672f570
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/Observers/AvatarObserver.php

+ 1 - 1
app/Observers/AvatarObserver.php

@@ -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)) {