-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from EasyAbp/v4
Decouple with the ABP BLOB storing module
- Loading branch information
Showing
67 changed files
with
1,104 additions
and
695 deletions.
There are no files selected for viewing
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
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
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
368 changes: 115 additions & 253 deletions
368
src/EasyAbp.FileManagement.Application/EasyAbp/FileManagement/Files/FileAppService.cs
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 29 additions & 3 deletions
32
...EasyAbp.FileManagement.Application/EasyAbp/FileManagement/Files/FileOperationInfoModel.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 |
---|---|---|
@@ -1,15 +1,41 @@ | ||
using System; | ||
using JetBrains.Annotations; | ||
|
||
namespace EasyAbp.FileManagement.Files | ||
{ | ||
public class FileOperationInfoModel | ||
{ | ||
public Guid? ParentId { get; set; } | ||
|
||
|
||
[NotNull] | ||
public string FileContainerName { get; set; } | ||
|
||
|
||
[CanBeNull] | ||
public string FileName { get; set; } | ||
|
||
[CanBeNull] | ||
public string MimeType { get; set; } | ||
|
||
public FileType? FileType { get; set; } | ||
|
||
public long? ByteSize { get; set; } | ||
|
||
public Guid? OwnerUserId { get; set; } | ||
|
||
|
||
[CanBeNull] | ||
public File File { get; set; } | ||
|
||
public FileOperationInfoModel(Guid? parentId, [NotNull] string fileContainerName, [CanBeNull] string fileName, | ||
[CanBeNull] string mimeType, FileType? fileType, long? byteSize, Guid? ownerUserId, [CanBeNull] File file) | ||
{ | ||
ParentId = parentId; | ||
FileContainerName = fileContainerName; | ||
FileName = fileName; | ||
MimeType = mimeType; | ||
FileType = fileType; | ||
ByteSize = byteSize; | ||
OwnerUserId = ownerUserId; | ||
File = file; | ||
} | ||
} | ||
} |
29 changes: 0 additions & 29 deletions
29
...ment.Application/EasyAbp/FileManagement/Files/MyBasicFileOperationAuthorizationHandler.cs
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
src/EasyAbp.FileManagement.Domain.Core/EasyAbp.FileManagement.Domain.Core.csproj
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,20 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<Import Project="..\..\common.props" /> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<RootNamespace /> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<InternalsVisibleTo Include="EasyAbp.FileManagement.Domain" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Volo.Abp.AutoMapper" Version="$(AbpVersion)" /> | ||
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="$(AbpVersion)" /> | ||
<ProjectReference Include="..\EasyAbp.FileManagement.Domain.Shared\EasyAbp.FileManagement.Domain.Shared.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions
36
...syAbp.FileManagement.Domain.Core/EasyAbp/FileManagement/FileManagementDomainCoreModule.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,36 @@ | ||
using EasyAbp.FileManagement.Files; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Volo.Abp.AutoMapper; | ||
using Volo.Abp.Domain; | ||
using Volo.Abp.Domain.Entities.Events.Distributed; | ||
using Volo.Abp.Modularity; | ||
|
||
namespace EasyAbp.FileManagement | ||
{ | ||
[DependsOn( | ||
typeof(FileManagementDomainSharedModule), | ||
typeof(AbpAutoMapperModule), | ||
typeof(AbpDddDomainModule) | ||
)] | ||
public class FileManagementDomainCoreModule : AbpModule | ||
{ | ||
public override void PreConfigureServices(ServiceConfigurationContext context) | ||
{ | ||
Configure<AbpDistributedEntityEventOptions>(options => | ||
{ | ||
options.EtoMappings.Add<File, FileEto>(typeof(FileManagementDomainCoreModule)); | ||
options.AutoEventSelectors.Add<File>(); | ||
}); | ||
} | ||
|
||
public override void ConfigureServices(ServiceConfigurationContext context) | ||
{ | ||
context.Services.AddAutoMapperObjectMapper<FileManagementDomainCoreModule>(); | ||
|
||
Configure<AbpAutoMapperOptions>(options => | ||
{ | ||
options.AddProfile<FileManagementDomainAutoMapperProfile>(validate: true); | ||
}); | ||
} | ||
} | ||
} |
File renamed without changes.
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
File renamed without changes.
13 changes: 13 additions & 0 deletions
13
...FileManagement.Domain.Core/EasyAbp/FileManagement/Files/FileContainerConflictException.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,13 @@ | ||
using Volo.Abp; | ||
|
||
namespace EasyAbp.FileManagement.Files | ||
{ | ||
public class FileContainerConflictException : BusinessException | ||
{ | ||
public FileContainerConflictException() : base( | ||
"FileContainerConflict", | ||
$"Multiple file upload requests attempted to save files in the same file container.") | ||
{ | ||
} | ||
} | ||
} |
File renamed without changes.
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
Oops, something went wrong.