43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using FileService.Application.Ports;
|
|
using FileService.Application.StorageContracts;
|
|
using FileService.Domain.ValueObjects;
|
|
using IM.Commons;
|
|
using MassTransit;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace FileService.Infrastructure.Storage
|
|
{
|
|
public class LocalStorageAdapter : IObjectStoragePort
|
|
{
|
|
private readonly IRedisService redis;
|
|
|
|
public LocalStorageAdapter(IRedisService redis)
|
|
{
|
|
this.redis = redis;
|
|
}
|
|
|
|
public string ProviderCode => "Local";
|
|
|
|
public Task<CompleteUploadResult> CompleteUploadAsync(CompleteUploadCommand command, CancellationToken token)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<PresignedUrl> GenerateUploadUrlAsync(GenerateUploadUrlCommand command, CancellationToken token)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public async Task<InitiateUploadResult> InitUploadAsync(InitiateUploadCommand command, CancellationToken token)
|
|
{
|
|
var sessionId = Guid.NewGuid();
|
|
var location = new StorageLocation();
|
|
return new InitiateUploadResult(sessionId.ToString(),location);
|
|
}
|
|
}
|
|
}
|