This commit is contained in:
2026-04-16 02:43:57 +05:00
parent 18ffc772e3
commit 6a4221f0a5
4 changed files with 7 additions and 23 deletions

View File

@@ -237,10 +237,7 @@ class Product extends Model
{
if (!empty($this->poster)) {
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
return Storage::temporaryUrl(
$this->poster,
Date::now()->addMinutes(5)
);
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->poster, '/');
}
return config('app.url') . '/' . $this->poster;
}
@@ -252,10 +249,7 @@ class Product extends Model
{
if (!empty($this->data_sheet) and ($this->data_sheet != null and $this->data_sheet != "null")) {
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
return Storage::temporaryUrl(
$this->data_sheet,
Date::now()->addMinutes(5)
);
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->data_sheet, '/');
}
return config('app.url') . '/' . $this->data_sheet;
}
@@ -266,10 +260,7 @@ class Product extends Model
{
if (!empty($this->poster_thumb)) {
if (in_array(config('filesystems.default'), ['s3', 'minio'])) {
return Storage::temporaryUrl(
$this->poster_thumb,
Date::now()->addMinutes(5)
);
return rtrim(config('filesystems.disks.s3.url'), '/') . '/' . ltrim($this->poster_thumb, '/');
}
return config('app.url') . '/' . $this->poster_thumb;
}