Activities of "liangshiwei"

Hi,

You can try to output the log here and check it in the console tab.

Hi,

You can check the document: https://docs.abp.io/en/commercial/latest/abp-suite/generating-crud-page#2-create-the-book-entity

For example:

Hi,

You can try to add link href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" rel="stylesheet"/> to the index.cshtml file

We will enhance it in the next version: https://github.com/abpframework/abp/issues/17875

Hi,

Could you use the abp suite to create a new project to reproduce the problem and share it with me? my email is shiwei.liang@volosoft.com.

I will check it. thanks.

Answer

Hi,

https://blog.abp.io/abp/ABP.IO-Platform-7-4-RC-Has-Been-Published

Support custom code starting from version 7.4

Hi,

We will check it.

Hi,

Could you share a project with me? I will check it. thanks shiwei.liang@volosoft.com

Hi,

Yes.

I want to set permissions dynamically according to creating menu items.

You need to implement it yourself.

But you can't add permissions dynamically, you can consider creating your own menu permission table and check menu permissions in the middleware

Your ticket was refunded

Hi

I can confirm the problem, we will fix it in the next patch version.

This is a temporary solution:

[Serializable]
[IgnoreMultiTenancy]
public class MyFileDownloadTokenCacheItem
{
    public Guid FileDescriptorId { get; set; }
    
    public Guid? TenantId { get; set; }
}

[RequiresFeature(FileManagementFeatures.Enable)]
[Authorize(FileManagementPermissions.FileDescriptor.Default)]
[ExposeServices(typeof(IFileDescriptorAppService))]
public class MyFileDescriptorAppService : FileDescriptorAppService
{
    private IDistributedCache<MyFileDownloadTokenCacheItem, string> _tokenCache { get; set; }
    
    public MyFileDescriptorAppService(IFileManager fileManager, IFileDescriptorRepository fileDescriptorRepository,
        IBlobContainer<FileManagementContainer> blobContainer,
        IDistributedCache<FileDownloadTokenCacheItem, string> downloadTokenCache,
        IDistributedCache<MyFileDownloadTokenCacheItem, string> tokenCache) : base(fileManager,
        fileDescriptorRepository, blobContainer, downloadTokenCache)
    {
        _tokenCache = tokenCache;
    }

    [AllowAnonymous]
    public override async Task<IRemoteStreamContent> DownloadAsync(Guid id, string token)
    {
        var downloadToken = await _tokenCache.GetAsync(token);
        if (downloadToken == null || downloadToken.FileDescriptorId != id)
        {
            throw new AbpAuthorizationException("Invalid download token: " + token);
        }

        using (CurrentTenant.Change(downloadToken.TenantId))
        {
            var fileDescriptor = await FileDescriptorRepository.GetAsync(id);
            var stream = await BlobContainer.GetAsync(id.ToString());
            return new RemoteStreamContent(stream, fileDescriptor?.Name);
        }

    }

    public override  async Task<DownloadTokenResultDto> GetDownloadTokenAsync(Guid id)
    {
        var token = Guid.NewGuid().ToString();

        await _tokenCache.SetAsync(
            token,
            new MyFileDownloadTokenCacheItem()
            {
                FileDescriptorId = id,
                TenantId = CurrentTenant.Id
            },
            new DistributedCacheEntryOptions
            {
                AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(60)
            });

        return new DownloadTokenResultDto
        {
            Token = token
        };
    }
}
Showing 3281 to 3290 of 6692 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 12, 2025, 10:20