mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-20 02:28:31 +01:00
25 lines
595 B
C#
25 lines
595 B
C#
|
using System.Threading.Tasks;
|
||
|
using BTCPayServer.Storage.Services;
|
||
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
||
|
namespace BTCPayServer.Storage
|
||
|
{
|
||
|
[Route("Storage")]
|
||
|
public class StorageController
|
||
|
{
|
||
|
private readonly FileService _FileService;
|
||
|
|
||
|
public StorageController(FileService fileService)
|
||
|
{
|
||
|
_FileService = fileService;
|
||
|
}
|
||
|
|
||
|
[HttpGet("{fileId}")]
|
||
|
public async Task<IActionResult> GetFile(string fileId)
|
||
|
{
|
||
|
var url = await _FileService.GetFileUrl(fileId);
|
||
|
return new RedirectResult(url);
|
||
|
}
|
||
|
}
|
||
|
}
|