mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Rename UI controllers
This commit is contained in:
24
BTCPayServer/Controllers/UIStorageController.cs
Normal file
24
BTCPayServer/Controllers/UIStorageController.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Storage.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace BTCPayServer.Storage
|
||||
{
|
||||
[Route("Storage")]
|
||||
public class UIStorageController : Controller
|
||||
{
|
||||
private readonly FileService _FileService;
|
||||
|
||||
public UIStorageController(FileService fileService)
|
||||
{
|
||||
_FileService = fileService;
|
||||
}
|
||||
|
||||
[HttpGet("{fileId}")]
|
||||
public async Task<IActionResult> GetFile(string fileId)
|
||||
{
|
||||
var url = await _FileService.GetFileUrl(Request.GetAbsoluteRootUri(), fileId);
|
||||
return new RedirectResult(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user