chore: commit current workspace changes
This commit is contained in:
@@ -198,6 +198,14 @@ class HomepageAnnouncementController extends Controller
|
||||
return;
|
||||
}
|
||||
|
||||
$backgroundDisk = $this->announcements->backgroundImageDisk();
|
||||
|
||||
if (Storage::disk($backgroundDisk)->exists($path)) {
|
||||
Storage::disk($backgroundDisk)->delete($path);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Storage::disk('public')->exists($path)) {
|
||||
Storage::disk('public')->delete($path);
|
||||
}
|
||||
@@ -268,8 +276,8 @@ class HomepageAnnouncementController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$storedPath = 'homepage-announcements/' . pathinfo(Str::replace('\\', '/', $file->hashName()), PATHINFO_FILENAME) . '.webp';
|
||||
Storage::disk('public')->put($storedPath, $webpBinary, ['visibility' => 'public']);
|
||||
$storedPath = $this->announcements->backgroundImagePrefix() . '/' . pathinfo(Str::replace('\\', '/', $file->hashName()), PATHINFO_FILENAME) . '.webp';
|
||||
Storage::disk($this->announcements->backgroundImageDisk())->put($storedPath, $webpBinary, ['visibility' => 'public']);
|
||||
} finally {
|
||||
imagedestroy($image);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user