diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-14 16:14:45 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-14 16:14:45 +0200 |
commit | 79db409a41bd28fd2773626c9a93b5d326a38bc0 (patch) | |
tree | fa947a47d7d2b0a9d7cf7d981a11bcdf6ddc545e /server/models | |
parent | a9fbc2aaa17ab74b38952f905c567c4fd2c9d9e8 (diff) | |
download | PeerTube-79db409a41bd28fd2773626c9a93b5d326a38bc0.tar.gz PeerTube-79db409a41bd28fd2773626c9a93b5d326a38bc0.tar.zst PeerTube-79db409a41bd28fd2773626c9a93b5d326a38bc0.zip |
More robust actor image lazy load
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/actor/actor-image.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/actor/actor-image.ts b/server/models/actor/actor-image.ts index a35f9edb0..98a7f6fba 100644 --- a/server/models/actor/actor-image.ts +++ b/server/models/actor/actor-image.ts | |||
@@ -98,4 +98,8 @@ export class ActorImageModel extends Model<Partial<AttributesOnly<ActorImageMode | |||
98 | const imagePath = join(CONFIG.STORAGE.ACTOR_IMAGES, this.filename) | 98 | const imagePath = join(CONFIG.STORAGE.ACTOR_IMAGES, this.filename) |
99 | return remove(imagePath) | 99 | return remove(imagePath) |
100 | } | 100 | } |
101 | |||
102 | isOwned () { | ||
103 | return !this.fileUrl | ||
104 | } | ||
101 | } | 105 | } |