Change editor rule
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public class AlbumConfiguration : IConfigurationOptions, IPictureOwnerConfiguration
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "Album";
|
||||
public class AlbumConfiguration : IConfigurationOptions, IPictureOwnerConfiguration
|
||||
{
|
||||
public static string SectionName => "Album";
|
||||
|
||||
[Required]
|
||||
public PictureRoutes Routes { get; set; } = new() { ParentFolder = "Albums" };
|
||||
[Required]
|
||||
public PictureRoutes Routes { get; set; } = new() { ParentFolder = "Albums" };
|
||||
|
||||
[Required]
|
||||
public PictureSizes PicturesSizes { get; set; } = new();
|
||||
[Required]
|
||||
public PictureSizes PicturesSizes { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public class ApplicationStorageConfiguration : IConfigurationOptions
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "ApplicationStorage";
|
||||
public class ApplicationStorageConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "ApplicationStorage";
|
||||
|
||||
[Required]
|
||||
[StringLength(128, MinimumLength = 1)]
|
||||
public required string Bucket { get; set; }
|
||||
[Required]
|
||||
[StringLength(128, MinimumLength = 1)]
|
||||
public required string Bucket { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,28 +2,29 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public static class ConfigurationDependencyInjection
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static IServiceCollection AddValidatedOptions<T>(this IServiceCollection services, IConfiguration configuration)
|
||||
where T : class, IConfigurationOptions =>
|
||||
services.AddValidatedOptions<T>(configuration, T.SectionName);
|
||||
|
||||
public static IServiceCollection AddValidatedOptions<T>(
|
||||
this IServiceCollection services,
|
||||
IConfiguration configuration,
|
||||
string sectionName)
|
||||
where T : class
|
||||
public static class ConfigurationDependencyInjection
|
||||
{
|
||||
services
|
||||
.AddOptionsWithValidateOnStart<T>()
|
||||
.Bind(configuration.GetRequiredSection(sectionName))
|
||||
.ValidateDataAnnotations();
|
||||
public static IServiceCollection AddValidatedOptions<T>(this IServiceCollection services, IConfiguration configuration)
|
||||
where T : class, IConfigurationOptions =>
|
||||
services.AddValidatedOptions<T>(configuration, T.SectionName);
|
||||
|
||||
services.AddSingleton(serviceProvider =>
|
||||
serviceProvider.GetRequiredService<IOptions<T>>().Value);
|
||||
public static IServiceCollection AddValidatedOptions<T>(
|
||||
this IServiceCollection services,
|
||||
IConfiguration configuration,
|
||||
string sectionName)
|
||||
where T : class
|
||||
{
|
||||
services
|
||||
.AddOptionsWithValidateOnStart<T>()
|
||||
.Bind(configuration.GetRequiredSection(sectionName))
|
||||
.ValidateDataAnnotations();
|
||||
|
||||
return services;
|
||||
services.AddSingleton(serviceProvider =>
|
||||
serviceProvider.GetRequiredService<IOptions<T>>().Value);
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
using Mediator;
|
||||
using Musify.Application.Configuration.Responses;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
|
||||
public record GetPlaybackPublicConfigQuery : IQuery<PlaybackPublicConfigResponse>;
|
||||
|
||||
public class GetPlaybackPublicConfigQueryHandler(PlaybackConfiguration playbackConfiguration)
|
||||
: IQueryHandler<GetPlaybackPublicConfigQuery, PlaybackPublicConfigResponse>
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public ValueTask<PlaybackPublicConfigResponse> Handle(GetPlaybackPublicConfigQuery query, CancellationToken cancellationToken) =>
|
||||
ValueTask.FromResult(new PlaybackPublicConfigResponse(
|
||||
playbackConfiguration.AllowAnonymousListening,
|
||||
playbackConfiguration.AnonymousFragmentSeconds));
|
||||
|
||||
public record GetPlaybackPublicConfigQuery : IQuery<PlaybackPublicConfigResponse>;
|
||||
|
||||
public class GetPlaybackPublicConfigQueryHandler(PlaybackConfiguration playbackConfiguration)
|
||||
: IQueryHandler<GetPlaybackPublicConfigQuery, PlaybackPublicConfigResponse>
|
||||
{
|
||||
public ValueTask<PlaybackPublicConfigResponse> Handle(GetPlaybackPublicConfigQuery query, CancellationToken cancellationToken) =>
|
||||
ValueTask.FromResult(new PlaybackPublicConfigResponse(
|
||||
playbackConfiguration.AllowAnonymousListening,
|
||||
playbackConfiguration.AnonymousFragmentSeconds));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public interface IConfigurationOptions
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static abstract string SectionName { get; }
|
||||
public interface IConfigurationOptions
|
||||
{
|
||||
public static abstract string SectionName { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public class MixConfiguration : IConfigurationOptions
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "Mix";
|
||||
public class MixConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "Mix";
|
||||
|
||||
[Range(4, 100)]
|
||||
public int ItemsPerMix { get; set; } = 12;
|
||||
[Range(4, 100)]
|
||||
public int ItemsPerMix { get; set; } = 12;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,90 +2,91 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Globalization;
|
||||
using Musify.Application.Shared;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public enum PictureSize
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
Small,
|
||||
Medium,
|
||||
Large
|
||||
}
|
||||
|
||||
public class PictureRoutes
|
||||
{
|
||||
[Required]
|
||||
public string UploadsFolder { get; set; } = "uploads";
|
||||
|
||||
[Required]
|
||||
public string ParentFolder { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
public string OriginalPicturesFolder { get; set; } = "OriginalPictures";
|
||||
|
||||
[Required]
|
||||
public string SmallPicturesFolder { get; set; } = "SmallPictures";
|
||||
|
||||
[Required]
|
||||
public string MediumPicturesFolder { get; set; } = "MediumPictures";
|
||||
|
||||
[Required]
|
||||
public string LargePicturesFolder { get; set; } = "LargePictures";
|
||||
|
||||
public string FolderPath(PictureSize size) => StorageKey.Combine(ParentFolder, size switch
|
||||
public enum PictureSize
|
||||
{
|
||||
PictureSize.Small => SmallPicturesFolder,
|
||||
PictureSize.Medium => MediumPicturesFolder,
|
||||
PictureSize.Large => LargePicturesFolder,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(size), size, null)
|
||||
});
|
||||
Small,
|
||||
Medium,
|
||||
Large
|
||||
}
|
||||
|
||||
public string BuildPicturePath(PictureSize size, string pictureName) => StorageKey.Combine(FolderPath(size), pictureName);
|
||||
public class PictureRoutes
|
||||
{
|
||||
[Required]
|
||||
public string UploadsFolder { get; set; } = "uploads";
|
||||
|
||||
public string BuildOriginalPicturePath(long userId, string pictureName) =>
|
||||
StorageKey.Combine(UploadsFolder, userId.ToString(CultureInfo.InvariantCulture), ParentFolder, OriginalPicturesFolder, pictureName);
|
||||
[Required]
|
||||
public string ParentFolder { get; set; } = string.Empty;
|
||||
|
||||
public string BuildTempPath(string tempRootPrefix, long userId, string objectName) =>
|
||||
StorageKey.Combine(tempRootPrefix, userId.ToString(CultureInfo.InvariantCulture), ParentFolder, objectName);
|
||||
}
|
||||
|
||||
public class PictureSizes
|
||||
{
|
||||
[Range(1, 1024)]
|
||||
public int SmallWidth { get; set; } = 128;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int SmallHeight { get; set; } = 128;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int MediumWidth { get; set; } = 256;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int MediumHeight { get; set; } = 256;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int LargeWidth { get; set; } = 512;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int LargeHeight { get; set; } = 512;
|
||||
|
||||
public ImageSizes ToImageSizes(PictureRoutes routes) => new(
|
||||
new ImageSize(routes.FolderPath(PictureSize.Small), SmallWidth, SmallHeight),
|
||||
new ImageSize(routes.FolderPath(PictureSize.Medium), MediumWidth, MediumHeight),
|
||||
new ImageSize(routes.FolderPath(PictureSize.Large), LargeWidth, LargeHeight));
|
||||
}
|
||||
|
||||
public interface IPictureOwnerConfiguration
|
||||
{
|
||||
public PictureRoutes Routes { get; }
|
||||
|
||||
public PictureSizes PicturesSizes { get; }
|
||||
}
|
||||
|
||||
public static class PictureSizeParser
|
||||
{
|
||||
/// <summary>Parses the <c>size</c> query value; anything unknown means <see cref="PictureSize.Medium"/>.</summary>
|
||||
public static PictureSize Parse(string? value) =>
|
||||
Enum.TryParse<PictureSize>(value, ignoreCase: true, out var size) && Enum.IsDefined(size)
|
||||
? size
|
||||
: PictureSize.Medium;
|
||||
[Required]
|
||||
public string OriginalPicturesFolder { get; set; } = "OriginalPictures";
|
||||
|
||||
[Required]
|
||||
public string SmallPicturesFolder { get; set; } = "SmallPictures";
|
||||
|
||||
[Required]
|
||||
public string MediumPicturesFolder { get; set; } = "MediumPictures";
|
||||
|
||||
[Required]
|
||||
public string LargePicturesFolder { get; set; } = "LargePictures";
|
||||
|
||||
public string FolderPath(PictureSize size) => StorageKey.Combine(ParentFolder, size switch
|
||||
{
|
||||
PictureSize.Small => SmallPicturesFolder,
|
||||
PictureSize.Medium => MediumPicturesFolder,
|
||||
PictureSize.Large => LargePicturesFolder,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(size), size, null)
|
||||
});
|
||||
|
||||
public string BuildPicturePath(PictureSize size, string pictureName) => StorageKey.Combine(FolderPath(size), pictureName);
|
||||
|
||||
public string BuildOriginalPicturePath(long userId, string pictureName) =>
|
||||
StorageKey.Combine(UploadsFolder, userId.ToString(CultureInfo.InvariantCulture), ParentFolder, OriginalPicturesFolder, pictureName);
|
||||
|
||||
public string BuildTempPath(string tempRootPrefix, long userId, string objectName) =>
|
||||
StorageKey.Combine(tempRootPrefix, userId.ToString(CultureInfo.InvariantCulture), ParentFolder, objectName);
|
||||
}
|
||||
|
||||
public class PictureSizes
|
||||
{
|
||||
[Range(1, 1024)]
|
||||
public int SmallWidth { get; set; } = 128;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int SmallHeight { get; set; } = 128;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int MediumWidth { get; set; } = 256;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int MediumHeight { get; set; } = 256;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int LargeWidth { get; set; } = 512;
|
||||
|
||||
[Range(1, 1024)]
|
||||
public int LargeHeight { get; set; } = 512;
|
||||
|
||||
public ImageSizes ToImageSizes(PictureRoutes routes) => new(
|
||||
new ImageSize(routes.FolderPath(PictureSize.Small), SmallWidth, SmallHeight),
|
||||
new ImageSize(routes.FolderPath(PictureSize.Medium), MediumWidth, MediumHeight),
|
||||
new ImageSize(routes.FolderPath(PictureSize.Large), LargeWidth, LargeHeight));
|
||||
}
|
||||
|
||||
public interface IPictureOwnerConfiguration
|
||||
{
|
||||
public PictureRoutes Routes { get; }
|
||||
|
||||
public PictureSizes PicturesSizes { get; }
|
||||
}
|
||||
|
||||
public static class PictureSizeParser
|
||||
{
|
||||
/// <summary>Parses the <c>size</c> query value; anything unknown means <see cref="PictureSize.Medium"/>.</summary>
|
||||
public static PictureSize Parse(string? value) =>
|
||||
Enum.TryParse<PictureSize>(value, ignoreCase: true, out var size) && Enum.IsDefined(size)
|
||||
? size
|
||||
: PictureSize.Medium;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public class PlayListConfiguration : IConfigurationOptions, IPictureOwnerConfiguration
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "PlayList";
|
||||
public class PlayListConfiguration : IConfigurationOptions, IPictureOwnerConfiguration
|
||||
{
|
||||
public static string SectionName => "PlayList";
|
||||
|
||||
[Required]
|
||||
public PictureRoutes Routes { get; set; } = new() { ParentFolder = "PlayLists" };
|
||||
[Required]
|
||||
public PictureRoutes Routes { get; set; } = new() { ParentFolder = "PlayLists" };
|
||||
|
||||
[Required]
|
||||
public PictureSizes PicturesSizes { get; set; } = new();
|
||||
[Required]
|
||||
public PictureSizes PicturesSizes { get; set; } = new();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
|
||||
public sealed class PlaybackConfiguration : IConfigurationOptions
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "Playback";
|
||||
|
||||
public bool AllowAnonymousListening { get; set; }
|
||||
public sealed class PlaybackConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "Playback";
|
||||
|
||||
[Range(0, 3600)]
|
||||
public int AnonymousFragmentSeconds { get; set; }
|
||||
public bool AllowAnonymousListening { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue)]
|
||||
public int EstimatedAudioBytesPerSecond { get; set; } = 16_000;
|
||||
[Range(0, 3600)]
|
||||
public int AnonymousFragmentSeconds { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue)]
|
||||
public int EstimatedAudioBytesPerSecond { get; set; } = 16_000;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -1,4 +1,5 @@
|
||||
namespace Musify.Application.Configuration.Responses;
|
||||
namespace Musify.Application.Configuration.Responses
|
||||
{
|
||||
|
||||
|
||||
public record PlaybackPublicConfigResponse(bool AllowAnonymousListening, int AnonymousFragmentSeconds);
|
||||
public record PlaybackPublicConfigResponse(bool AllowAnonymousListening, int AnonymousFragmentSeconds);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public class StreamGatewayConfiguration : IConfigurationOptions
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "StreamGateway";
|
||||
public class StreamGatewayConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "StreamGateway";
|
||||
|
||||
[Url]
|
||||
[Required]
|
||||
public required string PublicBaseUrl { get; set; }
|
||||
[Url]
|
||||
[Required]
|
||||
public required string PublicBaseUrl { get; set; }
|
||||
|
||||
[Required]
|
||||
public string AudioFileName { get; set; } = "audio.m4a";
|
||||
[Required]
|
||||
public string AudioFileName { get; set; } = "audio.m4a";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,55 +2,56 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Globalization;
|
||||
using Musify.Application.Shared;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public class TrackConfiguration : IConfigurationOptions, IPictureOwnerConfiguration
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "Track";
|
||||
|
||||
[Required]
|
||||
public TrackRoutes Routes { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
public PictureSizes PicturesSizes { get; set; } = new();
|
||||
|
||||
PictureRoutes IPictureOwnerConfiguration.Routes => Routes;
|
||||
}
|
||||
|
||||
public class TrackRoutes : PictureRoutes
|
||||
{
|
||||
public TrackRoutes()
|
||||
public class TrackConfiguration : IConfigurationOptions, IPictureOwnerConfiguration
|
||||
{
|
||||
ParentFolder = "Tracks";
|
||||
public static string SectionName => "Track";
|
||||
|
||||
[Required]
|
||||
public TrackRoutes Routes { get; set; } = new();
|
||||
|
||||
[Required]
|
||||
public PictureSizes PicturesSizes { get; set; } = new();
|
||||
|
||||
PictureRoutes IPictureOwnerConfiguration.Routes => Routes;
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string PresetOriginalPicture { get; set; } = "PresetOriginalPicture.webp";
|
||||
public class TrackRoutes : PictureRoutes
|
||||
{
|
||||
public TrackRoutes()
|
||||
{
|
||||
ParentFolder = "Tracks";
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string PresetSmallPicture { get; set; } = "PresetSmallPicture.webp";
|
||||
[Required]
|
||||
public string PresetOriginalPicture { get; set; } = "PresetOriginalPicture.webp";
|
||||
|
||||
[Required]
|
||||
public string PresetMediumPicture { get; set; } = "PresetMediumPicture.webp";
|
||||
[Required]
|
||||
public string PresetSmallPicture { get; set; } = "PresetSmallPicture.webp";
|
||||
|
||||
[Required]
|
||||
public string PresetLargePicture { get; set; } = "PresetLargePicture.webp";
|
||||
[Required]
|
||||
public string PresetMediumPicture { get; set; } = "PresetMediumPicture.webp";
|
||||
|
||||
[Required]
|
||||
public string OriginalAudiosFolder { get; set; } = "OriginalAudios";
|
||||
[Required]
|
||||
public string PresetLargePicture { get; set; } = "PresetLargePicture.webp";
|
||||
|
||||
[Required]
|
||||
public string ProcessedAudiosFolder { get; set; } = "ProcessedAudios";
|
||||
[Required]
|
||||
public string OriginalAudiosFolder { get; set; } = "OriginalAudios";
|
||||
|
||||
public string PresetSmallPicturePath => StorageKey.Combine(ParentFolder, PresetSmallPicture);
|
||||
[Required]
|
||||
public string ProcessedAudiosFolder { get; set; } = "ProcessedAudios";
|
||||
|
||||
public string PresetMediumPicturePath => StorageKey.Combine(ParentFolder, PresetMediumPicture);
|
||||
public string PresetSmallPicturePath => StorageKey.Combine(ParentFolder, PresetSmallPicture);
|
||||
|
||||
public string PresetLargePicturePath => StorageKey.Combine(ParentFolder, PresetLargePicture);
|
||||
public string PresetMediumPicturePath => StorageKey.Combine(ParentFolder, PresetMediumPicture);
|
||||
|
||||
public string BuildOriginalAudioPath(long userId, string audioName) =>
|
||||
StorageKey.Combine(UploadsFolder, userId.ToString(CultureInfo.InvariantCulture), ParentFolder, OriginalAudiosFolder, audioName);
|
||||
public string PresetLargePicturePath => StorageKey.Combine(ParentFolder, PresetLargePicture);
|
||||
|
||||
public string BuildProcessedAudioPath(string folderName) =>
|
||||
StorageKey.Combine(ParentFolder, ProcessedAudiosFolder, folderName);
|
||||
public string BuildOriginalAudioPath(long userId, string audioName) =>
|
||||
StorageKey.Combine(UploadsFolder, userId.ToString(CultureInfo.InvariantCulture), ParentFolder, OriginalAudiosFolder, audioName);
|
||||
|
||||
public string BuildProcessedAudioPath(string folderName) =>
|
||||
StorageKey.Combine(ParentFolder, ProcessedAudiosFolder, folderName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,41 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Musify.Application.Configuration;
|
||||
|
||||
public class UploadIntentConfiguration : IConfigurationOptions
|
||||
namespace Musify.Application.Configuration
|
||||
{
|
||||
public static string SectionName => "UploadIntent";
|
||||
public class UploadIntentConfiguration : IConfigurationOptions
|
||||
{
|
||||
public static string SectionName => "UploadIntent";
|
||||
|
||||
[Range(10, 3600)]
|
||||
public int UploadUrlExpiresInSeconds { get; set; } = 120;
|
||||
[Range(10, 3600)]
|
||||
public int UploadUrlExpiresInSeconds { get; set; } = 120;
|
||||
|
||||
[Range(1, 100)]
|
||||
public int MaxActiveUploadIntentsPerUser { get; set; } = 5;
|
||||
[Range(1, 100)]
|
||||
public int MaxActiveUploadIntentsPerUser { get; set; } = 5;
|
||||
|
||||
[Range(1, long.MaxValue)]
|
||||
public long MaxActiveUploadBytesPerUser { get; set; } = 200L * 1024 * 1024;
|
||||
[Range(1, long.MaxValue)]
|
||||
public long MaxActiveUploadBytesPerUser { get; set; } = 200L * 1024 * 1024;
|
||||
|
||||
[Range(1, long.MaxValue)]
|
||||
public long MaxUploadBytes { get; set; } = 100L * 1024 * 1024;
|
||||
[Range(1, long.MaxValue)]
|
||||
public long MaxUploadBytes { get; set; } = 100L * 1024 * 1024;
|
||||
|
||||
[Range(1, long.MaxValue)]
|
||||
public long DefaultExpectedPictureSizeBytes { get; set; } = 10L * 1024 * 1024;
|
||||
[Range(1, long.MaxValue)]
|
||||
public long DefaultExpectedPictureSizeBytes { get; set; } = 10L * 1024 * 1024;
|
||||
|
||||
[Range(1, long.MaxValue)]
|
||||
public long DefaultExpectedAudioSizeBytes { get; set; } = 100L * 1024 * 1024;
|
||||
[Range(1, long.MaxValue)]
|
||||
public long DefaultExpectedAudioSizeBytes { get; set; } = 100L * 1024 * 1024;
|
||||
|
||||
[Range(30, 86400)]
|
||||
public int ExpirationJobIntervalSeconds { get; set; } = 300;
|
||||
[Range(30, 86400)]
|
||||
public int ExpirationJobIntervalSeconds { get; set; } = 300;
|
||||
|
||||
[Range(0, 365)]
|
||||
public int ExpiredIntentsRetentionDays { get; set; } = 7;
|
||||
[Range(0, 365)]
|
||||
public int ExpiredIntentsRetentionDays { get; set; } = 7;
|
||||
|
||||
[Required, MinLength(1)]
|
||||
public string TempRootPrefix { get; set; } = "temp";
|
||||
[Required, MinLength(1)]
|
||||
public string TempRootPrefix { get; set; } = "temp";
|
||||
|
||||
[Range(1, 30)]
|
||||
public int TempUploadsRetentionDays { get; set; } = 3;
|
||||
[Range(1, 30)]
|
||||
public int TempUploadsRetentionDays { get; set; } = 3;
|
||||
|
||||
[Range(60, 86400)]
|
||||
public int TempCleanupJobIntervalSeconds { get; set; } = 3600;
|
||||
[Range(60, 86400)]
|
||||
public int TempCleanupJobIntervalSeconds { get; set; } = 3600;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user