1111
This commit is contained in:
@@ -33,6 +33,23 @@ namespace FileService.Application.StorageContracts
|
||||
|
||||
public Dictionary<int, UploadPart> Parts { get; init; } = new();
|
||||
|
||||
public UploadRuntimeCache(string taskId, string providerCode,
|
||||
string uploadSessionId, string bucket, string region,
|
||||
string objectKey, long fileSize, int totalPartCount,
|
||||
DateTimeOffset? expireAt = null)
|
||||
{
|
||||
TaskId = taskId;
|
||||
ProviderCode = providerCode;
|
||||
UploadSessionId = uploadSessionId;
|
||||
Bucket = bucket;
|
||||
Region = region;
|
||||
ObjectKey = objectKey;
|
||||
FileSize = fileSize;
|
||||
TotalPartCount = totalPartCount;
|
||||
ExpireAt = expireAt ?? DateTime.MaxValue;
|
||||
CreatedAt = DateTime.Now;
|
||||
}
|
||||
|
||||
public void AddOrUpdatePart(UploadPart part)
|
||||
{
|
||||
Parts[part.PartNumber] = part;
|
||||
|
||||
Reference in New Issue
Block a user