-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a default
NullLocalFileDownloadProvider
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
....FileManagement.Domain.Core/EasyAbp/FileManagement/Files/NullLocalFileDownloadProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.IO; | ||
using System.Threading.Tasks; | ||
using Volo.Abp.DependencyInjection; | ||
|
||
namespace EasyAbp.FileManagement.Files; | ||
|
||
[Dependency(TryRegister = true)] | ||
public class NullLocalFileDownloadProvider : ILocalFileDownloadProvider, ISingletonDependency | ||
{ | ||
public Task<FileDownloadInfoModel> CreateDownloadInfoAsync(File file) | ||
{ | ||
return Task.FromResult(new FileDownloadInfoModel()); | ||
} | ||
|
||
public Task CheckTokenAsync(string token, Guid fileId) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task<byte[]> GetDownloadBytesAsync(File file) | ||
{ | ||
return Task.FromResult<byte[]>(null); | ||
} | ||
|
||
public Task<Stream> GetDownloadStreamAsync(File file) | ||
{ | ||
return Task.FromResult<Stream>(null); | ||
} | ||
} |