storage url o'zgartirildi

This commit is contained in:
2026-04-28 16:00:18 +05:00
parent bb733d14c1
commit 0bf99a5e26
13 changed files with 80 additions and 30 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Jobs\Dashboard\Product;
use App\Models\Product;
use App\Models\Screen;
use App\Support\Uploads;
use Carbon\Carbon;
use App\Api\ImageResize;
@@ -83,10 +84,10 @@ class ChildUpdate
$folder = Carbon::now()->format('Y/m/d');
if ($screen['image']) {
// 1. Store original (S3 if enabled)
$path = $screen['image']->store("uploads/screens/{$folder}");
$path = Uploads::store($screen['image'], "uploads/screens/{$folder}");
// 2. Local temp for resizing
$tempPath = $screen['image']->store('temp', 'public');
$tempPath = Uploads::store($screen['image'], 'temp', 'public');
$thumbPath = $this->image->resize($tempPath, 322, 'screens', true);
Screen::create([
@@ -94,7 +95,7 @@ class ChildUpdate
'path_thumb' => $thumbPath,
'name' => basename($path),
'product_id' => $child_id,
'size' => Storage::disk(env('FILESYSTEM_DISK'))->size($path)
'size' => Storage::size($path)
]);
}
}