mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 10:40:29 +01:00
58d01738ab
* More Options refactoring Continues refactoring config classes to use the propert Options pattern where possible. DataDirectories and DatabaseOptions are now configured the Options pattern and the BTCPayOptions is now moved alongside the other config setup * Move COnfigure logic for Options to the Startup
25 lines
638 B
C#
25 lines
638 B
C#
using System.Threading.Tasks;
|
|
using BTCPayServer.Storage.Services;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Storage
|
|
{
|
|
[Route("Storage")]
|
|
public class StorageController : Controller
|
|
{
|
|
private readonly FileService _FileService;
|
|
|
|
public StorageController(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);
|
|
}
|
|
}
|
|
}
|