2022-06-29 19:46:41 -04:00
|
|
|
|
using Bit.Core.Entities;
|
2021-03-21 23:01:19 -05:00
|
|
|
|
using Bit.Core.Enums;
|
2020-11-02 15:55:49 -05:00
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Services
|
|
|
|
|
|
{
|
|
|
|
|
|
public class NoopSendFileStorageService : ISendFileStorageService
|
|
|
|
|
|
{
|
2021-03-21 23:01:19 -05:00
|
|
|
|
public FileUploadType FileUploadType => FileUploadType.Direct;
|
|
|
|
|
|
|
2020-11-02 15:55:49 -05:00
|
|
|
|
public Task UploadNewFileAsync(Stream stream, Send send, string attachmentId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2021-03-01 15:01:04 -06:00
|
|
|
|
public Task DeleteFileAsync(Send send, string fileId)
|
2020-11-02 15:55:49 -05:00
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task DeleteFilesForOrganizationAsync(Guid organizationId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task DeleteFilesForUserAsync(Guid userId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult(0);
|
|
|
|
|
|
}
|
2021-02-24 13:03:16 -06:00
|
|
|
|
|
2021-03-01 15:01:04 -06:00
|
|
|
|
public Task<string> GetSendFileDownloadUrlAsync(Send send, string fileId)
|
2021-02-24 13:03:16 -06:00
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult((string)null);
|
|
|
|
|
|
}
|
2021-03-21 23:01:19 -05:00
|
|
|
|
|
|
|
|
|
|
public Task<string> GetSendFileUploadUrlAsync(Send send, string fileId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult((string)null);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task<(bool, long?)> ValidateFileAsync(Send send, string fileId, long expectedFileSize, long leeway)
|
|
|
|
|
|
{
|
|
|
|
|
|
return Task.FromResult((false, default(long?)));
|
|
|
|
|
|
}
|
2020-11-02 15:55:49 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|