chore: 提交现有修改
This commit is contained in:
@@ -5,42 +5,35 @@ namespace TakeoutSaaS.Application.Storage.Contracts;
|
||||
/// <summary>
|
||||
/// 直传凭证请求模型。
|
||||
/// </summary>
|
||||
public sealed class DirectUploadRequest
|
||||
/// <remarks>
|
||||
/// 创建直传请求。
|
||||
/// </remarks>
|
||||
public sealed class DirectUploadRequest(UploadFileType fileType, string fileName, string contentType, long contentLength, string? requestOrigin)
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建直传请求。
|
||||
/// </summary>
|
||||
public DirectUploadRequest(UploadFileType fileType, string fileName, string contentType, long contentLength, string? requestOrigin)
|
||||
{
|
||||
FileType = fileType;
|
||||
FileName = fileName;
|
||||
ContentType = contentType;
|
||||
ContentLength = contentLength;
|
||||
RequestOrigin = requestOrigin;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型。
|
||||
/// </summary>
|
||||
public UploadFileType FileType { get; }
|
||||
public UploadFileType FileType { get; } = fileType;
|
||||
|
||||
/// <summary>
|
||||
/// 文件名。
|
||||
/// </summary>
|
||||
public string FileName { get; }
|
||||
public string FileName { get; } = fileName;
|
||||
|
||||
/// <summary>
|
||||
/// 内容类型。
|
||||
/// </summary>
|
||||
public string ContentType { get; }
|
||||
public string ContentType { get; } = contentType;
|
||||
|
||||
/// <summary>
|
||||
/// 文件长度。
|
||||
/// </summary>
|
||||
public long ContentLength { get; }
|
||||
public long ContentLength { get; } = contentLength;
|
||||
|
||||
/// <summary>
|
||||
/// 请求来源(Origin/Referer)。
|
||||
/// </summary>
|
||||
public string? RequestOrigin { get; }
|
||||
public string? RequestOrigin { get; } = requestOrigin;
|
||||
}
|
||||
|
||||
@@ -6,54 +6,46 @@ namespace TakeoutSaaS.Application.Storage.Contracts;
|
||||
/// <summary>
|
||||
/// 上传文件请求模型。
|
||||
/// </summary>
|
||||
public sealed class UploadFileRequest
|
||||
/// <remarks>
|
||||
/// 创建上传文件请求。
|
||||
/// </remarks>
|
||||
public sealed class UploadFileRequest(
|
||||
UploadFileType fileType,
|
||||
Stream content,
|
||||
string fileName,
|
||||
string contentType,
|
||||
long contentLength,
|
||||
string? requestOrigin)
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建上传文件请求。
|
||||
/// </summary>
|
||||
public UploadFileRequest(
|
||||
UploadFileType fileType,
|
||||
Stream content,
|
||||
string fileName,
|
||||
string contentType,
|
||||
long contentLength,
|
||||
string? requestOrigin)
|
||||
{
|
||||
FileType = fileType;
|
||||
Content = content;
|
||||
FileName = fileName;
|
||||
ContentType = contentType;
|
||||
ContentLength = contentLength;
|
||||
RequestOrigin = requestOrigin;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文件分类。
|
||||
/// </summary>
|
||||
public UploadFileType FileType { get; }
|
||||
public UploadFileType FileType { get; } = fileType;
|
||||
|
||||
/// <summary>
|
||||
/// 文件流。
|
||||
/// </summary>
|
||||
public Stream Content { get; }
|
||||
public Stream Content { get; } = content;
|
||||
|
||||
/// <summary>
|
||||
/// 原始文件名。
|
||||
/// </summary>
|
||||
public string FileName { get; }
|
||||
public string FileName { get; } = fileName;
|
||||
|
||||
/// <summary>
|
||||
/// 内容类型。
|
||||
/// </summary>
|
||||
public string ContentType { get; }
|
||||
public string ContentType { get; } = contentType;
|
||||
|
||||
/// <summary>
|
||||
/// 文件大小。
|
||||
/// </summary>
|
||||
public long ContentLength { get; }
|
||||
public long ContentLength { get; } = contentLength;
|
||||
|
||||
/// <summary>
|
||||
/// 请求来源(Origin/Referer)。
|
||||
/// </summary>
|
||||
public string? RequestOrigin { get; }
|
||||
public string? RequestOrigin { get; } = requestOrigin;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user