This commit is contained in:
2026-06-01 00:24:41 +02:00
parent 539899741d
commit 842b1ffd08
12 changed files with 22 additions and 44 deletions
@@ -6,47 +6,37 @@ namespace Musify.Application.Configuration
{
public const string SectionName = "UploadIntent";
// Pre-signed URL TTL in seconds
[Range(10, 3600)]
public int UploadUrlExpiresInSeconds { get; set; } = 120;
// Max concurrent Issued intents per user
[Range(1, 100)]
public int MaxActiveUploadIntentsPerUser { get; set; } = 5;
// Max total bytes across all Issued intents for a user (default 200MB)
[Range(1, long.MaxValue)]
public long MaxActiveUploadBytesPerUser { get; set; } = 200L * 1024 * 1024;
// Max size validated via HEAD before consuming an intent (default 100MB)
[Range(1, long.MaxValue)]
public long MaxUploadBytes { get; set; } = 100L * 1024 * 1024;
// Conservative fallback size used when ExpectedSizeBytes is not provided
[Range(1, long.MaxValue)]
public long DefaultExpectedPictureSizeBytes { get; set; } = 10L * 1024 * 1024; // 10MB
public long DefaultExpectedPictureSizeBytes { get; set; } = 10L * 1024 * 1024;
[Range(1, long.MaxValue)]
public long DefaultExpectedAudioSizeBytes { get; set; } = 100L * 1024 * 1024; // 100MB
public long DefaultExpectedAudioSizeBytes { get; set; } = 100L * 1024 * 1024;
// How often the expiration job runs
[Range(30, 86400)]
public int ExpirationJobIntervalSeconds { get; set; } = 300;
// How many days to retain Expired intents before deleting the DB row
[Range(0, 365)]
public int ExpiredIntentsRetentionDays { get; set; } = 7;
// Root S3 prefix for temporary uploads (Phase 2)
[Required, MinLength(1)]
public string TempRootPrefix { get; set; } = "temp";
public string TemporalRootPrefix { get; set; } = "temporal";
// How many days to retain orphaned temp objects in S3 before the cleanup job deletes them
[Range(1, 30)]
public int TempUploadsRetentionDays { get; set; } = 3;
public int TemporalUploadsRetentionDays { get; set; } = 3;
// How often the temp-upload cleanup job runs
[Range(60, 86400)]
public int TempCleanupJobIntervalSeconds { get; set; } = 3600;
public int TemporalCleanUpJobIntervalSeconds { get; set; } = 3600;
}
}