admin/src/Oms.Application/Dtos/Storage/FileStorageDtos.cs
zzh 14c42db752
All checks were successful
Build and Deploy / deploy (push) Successful in 1m8s
feat: 增加 /file-storage 接口,供附件预览按对象 key 流式读取
补 normalize-key 与 stream,兼容带或不带 admin 前缀的 COS 路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-06 12:21:06 +08:00

50 lines
1.0 KiB
C#

namespace Oms.Application.Dtos.Storage;
public class FileStorageNormalizeKeyInput
{
public string? PathOrUrl { get; set; }
}
public class FileStorageKeyOutput
{
public string Key { get; set; } = string.Empty;
}
public class FileStorageCapabilitiesOutput
{
public bool SupportsClientDirectUpload { get; set; }
public string? Provider { get; set; }
}
public class FileStorageAccessUrlOutput
{
public string Key { get; set; } = string.Empty;
public string Url { get; set; } = string.Empty;
}
public class FileStoragePresignInput
{
public string? Folder { get; set; }
public string? FileName { get; set; }
public string? ContentType { get; set; }
}
public class FileStoragePresignOutput
{
public string Key { get; set; } = string.Empty;
public string UploadUrl { get; set; } = string.Empty;
public string Method { get; set; } = "PUT";
public string? ContentType { get; set; }
public Dictionary<string, string>? Headers { get; set; }
public string? ExpireAt { get; set; }
}