Open Closed

FileManagement in multi-tenancy - FmDirectoryDescriptors table not accepting creating folders with Multi-tenancy #358


User avatar
0
cleverplatform created

Hello, I want to ask you how create records in Filemagement Module in FmDirectoryDescriptors table by accepting Multi-tenancy from application code.

from application code Im calling: _directoryDescriptorAppService.CreateAsync(new CreateDirectoryInput() { Name = project.Name, ParentId = rootId })

,but im not sure how to define/populate tenant id even that this attribure already exists in FmDirectoryDescriptors table.

in database this property is not populate when I created folder under tenant, like on picture below

also when im trying to create a new filemanagement directory from UI on FileManagement UI - folder is created but TenantID is not populated.

did I miss anything in confguration of this module?

thanks

  • ABP Framework version: v3.0.5
  • UI type: MVC
  • Tiered (MVC) or Identity Server Seperated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:

2 Answer(s)
  • User Avatar
    0
    cotur created

    Hi @cleverplatform,

    Thanks for opening that topic. You did not miss anything but unfortunately there is no work-around for that issue for now. In this development cycle (version 3.1) we had fix that issue. We are planning to release V3.1 Release Candidate in some days.

    Off Topic: I have a suggestion for you, as you see at following code block (CreateAsync method of DirectoryDescriptorAppService), we use DirectoryManager.

    var directoryDescriptor = await DirectoryManager.CreateAsync(input.Name, input.ParentId, CurrentTenant.Id);
    
    await DirectoryDescriptorRepository.InsertAsync(directoryDescriptor);
                
    return ObjectMapper.Map<DirectoryDescriptor, DirectoryDescriptorDto>(directoryDescriptor);
    

    This module uses two domain service, DirectoryManager and FileManager. We suggest to use those managers for creating/moving/deleting directory or files.

  • User Avatar
    0
    alper created
    Support Team Director

    credit for this question has been refunded.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 26, 2024, 06:07