添加项目文件。
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IM.InitCommon
|
||||
{
|
||||
public class StorageOptions
|
||||
{
|
||||
public string ProviderCode { get; init; } = default!;
|
||||
|
||||
public StorageProviderType ProviderType { get; init; }
|
||||
|
||||
public bool Enabled { get; init; } = true;
|
||||
|
||||
public string Bucket { get; init; } = default!;
|
||||
|
||||
public string Region { get; init; } = default!;
|
||||
|
||||
public string? Endpoint { get; init; }
|
||||
|
||||
public string? PublicBaseUrl { get; init; }
|
||||
|
||||
public string? AccessKeyId { get; init; }
|
||||
|
||||
public string? AccessKeySecret { get; init; }
|
||||
|
||||
public string? LocalRootPath { get; init; }
|
||||
|
||||
public string? LocalUploadApiBaseUrl { get; init; }
|
||||
|
||||
public TimeSpan UploadUrlExpiresIn { get; init; } = TimeSpan.FromMinutes(15);
|
||||
|
||||
public TimeSpan DownloadUrlExpiresIn { get; init; } = TimeSpan.FromMinutes(30);
|
||||
|
||||
public long MaxObjectSizeBytes { get; init; } = 1024L * 1024 * 1024;
|
||||
|
||||
public int MinPartSizeBytes { get; init; } = 5 * 1024 * 1024;
|
||||
|
||||
public int MaxPartCount { get; init; } = 10_000;
|
||||
}
|
||||
public enum StorageProviderType
|
||||
{
|
||||
Local = 1,
|
||||
AwsS3 = 2,
|
||||
AliyunOss = 3,
|
||||
TencentCos = 4,
|
||||
Minio = 5
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user