Skip to content

Commit 1dfcbb4

Browse files
committed
删除废弃海报
1 parent 97f3b24 commit 1dfcbb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/MiniProgramShareImg.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ public static function run(Model $model, $url, $rebuild = false)
131131
$path = $poster->content;
132132
} else {
133133
$path = self::generateShareImage($url);
134+
$old = $poster->content;
135+
if (!empty($old) && isset($old['path']) && Storage::disk('MiniProgramShare')->exists($old['path'])) {
136+
Storage::disk('MiniProgramShare')->delete($old['path']);
137+
}
134138

135139
$poster->content = $path;
136140

0 commit comments

Comments
 (0)