storage url o'zgartirildi
This commit is contained in:
@@ -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)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user