Activities of "cotur"

Hi @nhontran

ABP Framework has many core changes for IRemoteStreamContent after 3.3.2 version. The following steps may not work properly.

You can just replace the dto objects that has byte[] property to an IRemoteStreamContent object with the stream. Most of ABP API's support stream and byte array, you can create extra app service methods to accept stream, also you need to create controller so you can accept IFormFile.

For the newest version of abp, the IRemoteStreamContent fully supported, you don't need to override anything or create any extra controller etc.

I need to more information about your second issue, how the download process goes? This happens while you use File Management module?

Actually I don't know what is the Alerts object?

There is no Alerts in ABP MVC Razor Pages. That is exist in JavaScript.

Hi,

The CurrentUser contains the TenantId.

You can get the tenant information via ITenantRepository. The tenant entity contains it's edition id.

// DI
private readonly ICurrentUser _currentUser;
private readonly ITenantRepository _tenantRepository;
private readonly IEditionRepository _editionRepository;

ctor(ICurrentUser currentUser, ITenantRepository tenantRepository, IEditionRepository editionRepository){
    _currentUser = currentUser;
    _tenantRepository = tenantRepository;
    _editionRepository = editionRepository;
}

public async Task<Guid?> GetEditionId(){

            var tenantId = CurrentUser.TenantId;

            if (!tenantId.HasValue)
            {
                return null;
            }
            else
            {
                var tenant = await _tenantRepository.GetAsync(tenantId.Value);

                if (!tenant.EditionId.HasValue)
                {
                    return null;
                }

                var edition = await _editionRepository.GetAsync(tenant.EditionId.Value);
                
                return edition.Id;
            }
}

Hi

File upload and the BLOB Storing is different.

Your given examples are not inspectable. The problem may be anywhere.

Also, you can use streams directly instead of byte array, please check: https://docs.abp.io/en/abp/latest/Application-Services#working-with-streams

Answer

Hi Leonardo.Willrich,

Thanks for informing the situation. We will check this.

Hi @Leonardo.Willrich

There is no way to use extra properties with any file action,

For any image upload, you need to override the form.

Hi @Naren,

There is no any tool to convert blazor wasm to blazor server.

But the general concept is same, you can move your blazor components to a blazor server project, it will work smootly, you should not do any extra work.

If you get any trouble, just let us know.

Hi,

You can try to disable multi-tenacy filter then exceture your query, but be careful, you also need to filter your tenant entities by yourself.

https://docs.abp.io/en/abp/latest/Multi-Tenancy#data-filtering-disable-the-multi-tenancy-filter

You can use ICurrentPrincipalAccessor service to change users.

The FakeCurrentPrincipalAccessor that I mentioned before is also implements ICurrentPrincipalAccessor

First, inject the ICurrentPrincipalAccessor in your test class

public class MyTest : MyTestBase
{
        private readonly ICurrentPrincipalAccessor _currentPrincipalAccessor;
        
        public MyTest()
        {
            _currentPrincipalAccessor = GetRequiredService<ICurrentPrincipalAccessor>();
        }
}

Then use Change method with using statement to set new user.

[Fact]
public async CheckForUser_4()
{
    var user_4 = new ClaimsPrincipal();
    using (_currentPrincipalAccessor.Change(user_4))
    {
        // here, the current user will be user_4
    }
}

Hi Joe

For all ABP templates, we use Serilog,

For size limiting, you can use Serilog.Sinks.File NuGet package, please check this https://github.com/serilog/serilog-sinks-file#limits

Showing 41 to 50 of 89 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13