hi
Can you share your project source code? I need to check it on my local. liming.ma@volosoft.com
hi
You should inherit the PermissionDataSeedContributor
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(YourPermissionDataSeedContributor), typeof(PermissionDataSeedContributor), typeof(IDataSeedContributor))]
public class YourPermissionDataSeedContributor : PermissionDataSeedContributor
hi
using System.Threading.Tasks;
using Amazon.S3;
using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Security.Encryption;
namespace Volo.Abp.BlobStoring.Aws;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAmazonS3ClientFactory), typeof(DefaultAmazonS3ClientFactory))]
public class MyAmazonS3ClientFactory : DefaultAmazonS3ClientFactory
{
public MyAmazonS3ClientFactory(
IDistributedCache<AwsTemporaryCredentialsCacheItem> cache,
IStringEncryptionService stringEncryptionService)
: base(cache, stringEncryptionService)
{
}
public override Task<AmazonS3Client> GetAmazonS3Client(AwsBlobProviderConfiguration configuration)
{
// TODO: Add your custom logic here
return base.GetAmazonS3Client(configuration);
}
}
Thanks rohit.jadhav
: )
hi
You can inject ILanguageProvider service to get all languages.
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/ILanguageProvider.cs
hi
You can remove the PermissionDataSeedContributor from AbpDataSeedOptions
public override void ConfigureServices(ServiceConfigurationContext context)
{
PostConfigure<AbpDataSeedOptions>(options =>
{
options.Contributors.RemoveAll(x => x == typeof(PermissionDataSeedContributor));
});
}
public class YourPermissionDataSeedContributor : IDataSeedContributor, ITransientDependency