import fixed
This commit is contained in:
Generated
+6
-6
@@ -797,16 +797,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "intervention/image",
|
"name": "intervention/image",
|
||||||
"version": "4.0.4",
|
"version": "4.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Intervention/image.git",
|
"url": "https://github.com/Intervention/image.git",
|
||||||
"reference": "f58d379b1f13c036b2ef5c3c26eb4b0c88b647ed"
|
"reference": "fb795553f76afbe55c80d32b6bfe2090a6b1a0af"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Intervention/image/zipball/f58d379b1f13c036b2ef5c3c26eb4b0c88b647ed",
|
"url": "https://api.github.com/repos/Intervention/image/zipball/fb795553f76afbe55c80d32b6bfe2090a6b1a0af",
|
||||||
"reference": "f58d379b1f13c036b2ef5c3c26eb4b0c88b647ed",
|
"reference": "fb795553f76afbe55c80d32b6bfe2090a6b1a0af",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -853,7 +853,7 @@
|
|||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/Intervention/image/issues",
|
"issues": "https://github.com/Intervention/image/issues",
|
||||||
"source": "https://github.com/Intervention/image/tree/4.0.4"
|
"source": "https://github.com/Intervention/image/tree/4.1.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -869,7 +869,7 @@
|
|||||||
"type": "ko_fi"
|
"type": "ko_fi"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-05-03T04:47:13+00:00"
|
"time": "2026-05-15T06:52:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ class RebuildThumbnails extends Command
|
|||||||
$files = FileRepo::query()->get();
|
$files = FileRepo::query()->get();
|
||||||
$disk = $this->fileService->loadPublicDisk();
|
$disk = $this->fileService->loadPublicDisk();
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
$this->fileService->createTemplates($disk, $file->path);
|
|
||||||
try {
|
try {
|
||||||
|
$this->fileService->createTemplates($disk, $file->path);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->error(
|
$this->error(
|
||||||
"File " . $file->filename . " could not be rebuilt \n",
|
"File " . $file->filename . " could not be rebuilt \n",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace Lucent\File;
|
|||||||
|
|
||||||
use Illuminate\Contracts\Filesystem\Filesystem;
|
use Illuminate\Contracts\Filesystem\Filesystem;
|
||||||
use Illuminate\Http\UploadedFile;
|
use Illuminate\Http\UploadedFile;
|
||||||
|
use Illuminate\Log\Logger;
|
||||||
use Illuminate\Support\Facades\Storage;
|
use Illuminate\Support\Facades\Storage;
|
||||||
use Illuminate\Support\Str;
|
use Illuminate\Support\Str;
|
||||||
use Intervention\Image\Format;
|
use Intervention\Image\Format;
|
||||||
@@ -19,6 +20,7 @@ class FileService
|
|||||||
public function __construct(
|
public function __construct(
|
||||||
public ChannelService $channelService,
|
public ChannelService $channelService,
|
||||||
public ImageManager $imageManager,
|
public ImageManager $imageManager,
|
||||||
|
public Logger $logger,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public function createFromUrl(
|
public function createFromUrl(
|
||||||
@@ -126,8 +128,14 @@ class FileService
|
|||||||
|
|
||||||
public function createTemplates(Filesystem $disk, string $path): void
|
public function createTemplates(Filesystem $disk, string $path): void
|
||||||
{
|
{
|
||||||
|
$filePath = "lucent/" . $path;
|
||||||
|
|
||||||
|
if (!$this->loadPublicDisk()->exists($filePath)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$originalImage = $this->imageManager->decode(
|
$originalImage = $this->imageManager->decode(
|
||||||
$this->loadPublicDisk()->get("lucent/" . $path),
|
$this->loadPublicDisk()->get($filePath),
|
||||||
);
|
);
|
||||||
foreach ($this->channelService->channel->imageFilters as $filterClass) {
|
foreach ($this->channelService->channel->imageFilters as $filterClass) {
|
||||||
$imageClone = clone $originalImage;
|
$imageClone = clone $originalImage;
|
||||||
|
|||||||
Reference in New Issue
Block a user