Open Closed

Unable to extend FileManagement module in a ObjectExtensionManager #2985


User avatar
0
cezary.bojko created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.1.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I'm trying to display additional column (CreationTime) in a file management module. This column already exists but it isn't returned from an endpoint.

I've added new column contributor in typescript:

const creationTimeProp = new EntityProp<DirectoryContentDto>({
	type: ePropType.DateTime,
	name: 'creationTime',
	displayName: 'AbpFileManagement::CreationTime',
	sortable: true,
	columnWidth: 250,
});

export function creationTimePropContributor(propList: EntityPropList<DirectoryContentDto>) {
	propList.addAfter(creationTimeProp, 'creationTime', (value, name) => value.name === name);
}

export const fileManagementEntityPropContributors: FileManagementEntityPropContributors = {
	[eFileManagementComponents.FolderContent]: [creationTimePropContributor],
};

But cannot configure module on the backend side (missing helpers for a FileManagement module). There is no 'ConfigureFileManagement' or 'ConfigureFileDescriptor' methods.

        ObjectExtensionManager.Instance.Modules()
            .ConfigureFileManagement(m =>
            {
                m.ConfigureFileDescriptor(u =>
                {
                    u.AddOrUpdateProperty&lt;DateTime&gt;("CreationTime", property =>
                    {
        
                    });
                });
            });

3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We will make the FileManagement module can be extended.

  • User Avatar
    0
    Dicky.tech@gmail.com created

    This will mean we can connect custom entities i.e sales orders entities with the files module ?

    I.e add attachments to the sales orders

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    See https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Guide

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11