diff --git a/app/Http/Controllers/Dashboard/Product/Controller.php b/app/Http/Controllers/Dashboard/Product/Controller.php index 5f1ee8f..efd5fb7 100755 --- a/app/Http/Controllers/Dashboard/Product/Controller.php +++ b/app/Http/Controllers/Dashboard/Product/Controller.php @@ -271,14 +271,7 @@ class Controller extends ExController foreach ($product->childrens as $children) { foreach ($children->screens as $screen) { $screen->sizeText = $screen->size / 1024 . 'Kb'; - if (env('FILESYSTEM_DISK') == 's3') { - $screen->url = Storage::temporaryUrl( - $screen->path, - Date::now()->addMinutes(5) - ); - } else { - $screen->url = '/' . $screen->path; - } + $screen->url = $screen->getPath(); $screen->type = "image/jpeg"; } } diff --git a/app/Models/Screen.php b/app/Models/Screen.php index 3ad6a29..09c7148 100755 --- a/app/Models/Screen.php +++ b/app/Models/Screen.php @@ -53,12 +53,10 @@ class Screen extends Model public function getPath(): string { if (!empty($this->path)) { - if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) { - return Storage::temporaryUrl( - $this->path, Date::now()->addMinutes(5) - ); + if (in_array(config('filesystems.default'), ['s3', 'minio'])) { + return Storage::url($this->path); } - return (string) $this->path; + return config('app.url') . '/' . $this->path; } return (string) 'image/no_screen.png'; @@ -70,12 +68,10 @@ class Screen extends Model public function getPathThumb(): string { if (!empty($this->path_thumb)) { - if (in_array(env('FILESYSTEM_DISK'), ['s3', 'minio'])) { - return Storage::temporaryUrl( - $this->path_thumb, Date::now()->addMinutes(5) - ); + if (in_array(config('filesystems.default'), ['s3', 'minio'])) { + return Storage::url($this->path_thumb); } - return (string) $this->path_thumb; + return config('app.url') . '/' . $this->path_thumb; } return (string) 'image/no_screen_thumb.png'; diff --git a/public/uploads/screens/thumbs/2026/04/15/6kKlINo8aDnwJsgheJiyv8e7q13jNW6o6SIN48CX.png b/public/uploads/screens/thumbs/2026/04/15/6kKlINo8aDnwJsgheJiyv8e7q13jNW6o6SIN48CX.png new file mode 100644 index 0000000..6c07f7e Binary files /dev/null and b/public/uploads/screens/thumbs/2026/04/15/6kKlINo8aDnwJsgheJiyv8e7q13jNW6o6SIN48CX.png differ