Files
TakeoutSaaS.TenantApi/src/Modules/TakeoutSaaS.Module.Storage/Options/QiniuKodoOptions.cs
2026-02-17 12:12:01 +08:00

51 lines
1.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.ComponentModel.DataAnnotations;
namespace TakeoutSaaS.Module.Storage.Options;
/// <summary>
/// 七牛云 Kodo S3 兼容网关配置。
/// </summary>
public sealed class QiniuKodoOptions
{
/// <summary>
/// AccessKey。
/// </summary>
[Required]
public string AccessKey { get; set; } = string.Empty;
/// <summary>
/// SecretKey。
/// </summary>
[Required]
public string SecretKey { get; set; } = string.Empty;
/// <summary>
/// 绑定的空间名称。
/// </summary>
[Required]
public string Bucket { get; set; } = string.Empty;
/// <summary>
/// 下载域名CDN 域名或测试域名),用于生成访问链接。
/// </summary>
[Url]
public string? DownloadDomain { get; set; }
/// <summary>
/// S3 兼容网关 Endpoint如 https://s3-cn-south-1.qiniucs.com为空则使用官方默认。
/// </summary>
[Url]
public string? Endpoint { get; set; }
/// <summary>
/// 是否使用 HTTPS。
/// </summary>
public bool UseHttps { get; set; } = true;
/// <summary>
/// 直传或下载时默认有效期(分钟),未设置时使用全局安全配置。
/// </summary>
[Range(1, 24 * 60)]
public int? SignedUrlExpirationMinutes { get; set; }
}