feat: add aliyun oss storage foundation

This commit is contained in:
xiong
2026-07-26 14:43:04 +08:00
parent 47613b51bd
commit c6051f95f2
13 changed files with 969 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
namespace Tiku.Application.Storage;
public interface IObjectStorageService
{
string ConfiguredDefaultProvider();
string ConfiguredDefaultBucket();
string NormalizeProvider(string? value, string? fallback = null);
string ValidateObjectKey(Guid tenantId, string objectKey);
string ValidateMimeType(string mimeType);
long? ValidateFileSize(long? fileSizeBytes);
void AssertUploadProvider(string provider);
void AssertWritableLocation(StorageAssetLocation location);
Task<ObjectStorageSignedUrl> SignUploadAsync(
ObjectStorageUploadSignRequest request,
CancellationToken cancellationToken = default);
Task<ObjectStorageSignedUrl> SignDownloadAsync(
ObjectStorageDownloadSignRequest request,
CancellationToken cancellationToken = default);
Task<ObjectStorageMetadata> HeadObjectAsync(
ObjectStorageHeadRequest request,
CancellationToken cancellationToken = default);
}