Fix blog post image upload storage
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-22 15:03:05 +01:00
parent 02a24877f7
commit 446eb15c6b
3 changed files with 42 additions and 6 deletions

View File

@@ -63,12 +63,11 @@ class BlogPost extends Model
}
$path = ltrim($this->banner, '/');
if (str_starts_with($path, 'storage/')) {
$path = substr($path, strlen('storage/'));
}
return \URL::temporarySignedRoute(
'api.v1.branding.asset',
now()->addMinutes(30),
['path' => $path]
);
return \Storage::disk('public')->url($path);
});
}