mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-22 14:22:40 +01:00
Fix Azure Storage (#803)
This commit is contained in:
parent
bac99deb6c
commit
8a99fc0505
2 changed files with 13 additions and 3 deletions
|
@ -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; }
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue