You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.3 KiB
51 lines
1.3 KiB
5 months ago
|
// 大名科技(天津)有限公司版权所有 电话:18020030720 QQ:515096995
|
||
|
//
|
||
|
// 此源代码遵循位于源代码树根目录中的 LICENSE 文件的许可证
|
||
|
|
||
|
using OnceMi.AspNetCore.OSS;
|
||
|
|
||
|
namespace Admin.NET.Core;
|
||
|
|
||
|
/// <summary>
|
||
|
/// 文件上传配置选项
|
||
|
/// </summary>
|
||
|
public sealed class UploadOptions : IConfigurableOptions
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 路径
|
||
|
/// </summary>
|
||
|
public string Path { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 大小
|
||
|
/// </summary>
|
||
|
public long MaxSize { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 上传格式
|
||
|
/// </summary>
|
||
|
public List<string> ContentType { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 启用文件MD5验证
|
||
|
/// </summary>
|
||
|
/// <remarks>防止重复上传</remarks>
|
||
|
public bool EnableMd5 { get; set; }
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 对象存储配置选项
|
||
|
/// </summary>
|
||
|
public sealed class OSSProviderOptions : OSSOptions, IConfigurableOptions
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 是否启用OSS存储
|
||
|
/// </summary>
|
||
|
public bool IsEnable { get; set; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// 自定义桶名称 不能直接使用Provider来替代桶名称
|
||
|
/// 例:阿里云 1.只能包括小写字母,数字,短横线(-)2.必须以小写字母或者数字开头 3.长度必须在3-63字节之间
|
||
|
/// </summary>
|
||
|
public string Bucket { get; set; }
|
||
|
}
|