mirror of
https://github.com/CannedNet/CannedNet.git
synced 2026-10-27 07:58:59 -07:00
basic admin panel stuff
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace CannedNet.Admin.Services;
|
||||
|
||||
public class ImageUrlService
|
||||
{
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public ImageUrlService(string baseUrl)
|
||||
{
|
||||
_baseUrl = baseUrl.TrimEnd('/');
|
||||
}
|
||||
|
||||
public string GetUrl(string? path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path)) return "";
|
||||
return $"{_baseUrl}/{path.TrimStart('/')}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user