mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-09 08:14:21 +01:00
Fix Azure Storage (#803)
This commit is contained in:
committed by
Nicolas Dorier
parent
bac99deb6c
commit
8a99fc0505
@@ -1,9 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using BTCPayServer.Storage.Services.Providers.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using TwentyTwenty.Storage.Azure;
|
||||
|
||||
namespace BTCPayServer.Storage.Services.Providers.AzureBlobStorage.Configuration
|
||||
{
|
||||
[ModelMetadataType(typeof(AzureBlobStorageConfigurationMetadata))]
|
||||
public class AzureBlobStorageConfiguration : AzureProviderOptions, IBaseStorageConfiguration
|
||||
{
|
||||
[Required]
|
||||
@@ -12,8 +14,5 @@ namespace BTCPayServer.Storage.Services.Providers.AzureBlobStorage.Configuration
|
||||
[RegularExpression(@"[a-z0-9-]+",
|
||||
ErrorMessage = "Characters must be lowercase or digits or -")]
|
||||
public string ContainerName { get; set; }
|
||||
|
||||
[Required][AzureBlobStorageConnectionStringValidator]
|
||||
public new string ConnectionString { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BTCPayServer.Storage.Services.Providers.AzureBlobStorage.Configuration
|
||||
{
|
||||
public class AzureBlobStorageConfigurationMetadata
|
||||
{
|
||||
[Required]
|
||||
[AzureBlobStorageConnectionStringValidator]
|
||||
public string ConnectionString { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user