Add UploadLimits service and refactor user and media listing endpoints to use filter records for improved parameter handling. Update audio upload logic to streamline parameter passing and enhance clarity. Adjust ImageEndpoints to use HashSet for allowed extensions, and refine StreamingEndpoints to clarify token handling.
This commit is contained in:
@@ -15,7 +15,9 @@ public static class ImageEndpoints
|
||||
{
|
||||
private const long MaxBytes = 50L * 1024 * 1024; // 50 МБ
|
||||
|
||||
private static readonly IReadOnlySet<string> AllowedExtensions = new HashSet<string>(
|
||||
// Тип поля — HashSet, а не IReadOnlySet: поле приватное, и через интерфейс Contains уходит
|
||||
// в виртуальный вызов вместо прямого.
|
||||
private static readonly HashSet<string> AllowedExtensions = new(
|
||||
StringComparer.OrdinalIgnoreCase
|
||||
)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user