diff --git a/BTCPayServer/Controllers/ServerController.Storage.cs b/BTCPayServer/Controllers/ServerController.Storage.cs index 5bd148bef..18b470b30 100644 --- a/BTCPayServer/Controllers/ServerController.Storage.cs +++ b/BTCPayServer/Controllers/ServerController.Storage.cs @@ -30,13 +30,14 @@ namespace BTCPayServer.Controllers { var fileUrl = string.IsNullOrEmpty(fileId) ? null : await _FileService.GetFileUrl(Request.GetAbsoluteRootUri(), fileId); - return View(new ViewFilesViewModel() + var model = new ViewFilesViewModel() { Files = await _StoredFileRepository.GetFiles(), SelectedFileId = string.IsNullOrEmpty(fileUrl) ? null : fileId, DirectFileUrl = fileUrl, StorageConfigured = (await _SettingsRepository.GetSettingAsync()) != null - }); + }; + return View(model); } [HttpGet("server/files/{fileId}/delete")] diff --git a/BTCPayServer/Views/Server/Files.cshtml b/BTCPayServer/Views/Server/Files.cshtml index dfb7c6616..5f5de22ca 100644 --- a/BTCPayServer/Views/Server/Files.cshtml +++ b/BTCPayServer/Views/Server/Files.cshtml @@ -5,48 +5,64 @@

@ViewData["PageTitle"]

-

- Change your external storage service provider. - - - -

- -@if (Model.Files.Any()) +@if (!Model.StorageConfigured) { - - - - - - - - - - - @foreach (var file in Model.Files) - { - - - - - - - } - -
NameTimestampUser
@file.FileName@file.Timestamp.ToBrowserDate()@file.ApplicationUser.UserName - Get Link - - Get Temp Link - - Remove -
+

+ Before being able to upload you first need to + + choose your external storage service provider + . + + + +

} else { -

- There are no files yet. +

+ Change your external storage service provider. + + +

+ + @if (Model.Files.Any()) + { + + + + + + + + + + + @foreach (var file in Model.Files) + { + + + + + + + } + +
NameTimestampUser
@file.FileName@file.Timestamp.ToBrowserDate()@file.ApplicationUser.UserName + Get Link + - Get Temp Link + - Remove +
+ } + else + { +

+ There are no files yet. +

+ } } + @if (!string.IsNullOrEmpty(Model.SelectedFileId)) { var file = Model.Files.Single(storedFile => storedFile.Id.Equals(Model.SelectedFileId, StringComparison.InvariantCultureIgnoreCase));