Open Closed

Accessing volo.fileManagement.files.fileDescriptor Service in JS #6406


User avatar
0
SuperBeastX3 created
  • ABP Framework version: v7.4
  • UI Type: MVC
  • Database System: EF Core
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am trying to access the file descriptor service in javascript. I am using this line, which was taken from the file management javascript file: var fileDescriptorService = volo.fileManagement.files.fileDescriptor; I get the following error: Cannot read properties of undefined (reading 'files')

I don't understand why.


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You need to add the static JS proxy file.

    <abp-script src="/client-proxies/fileManagement-proxy.js" />

    Or add JS proxy file to global bundle:

    Configure<AbpBundlingOptions>(options =>
    {
        options.ScriptsBundles.Configure(
            LeptonXThemeBundles.Scripts.Global,
            bundle =>
            {
                bundle.AddFiles("/client-proxies/fileManagement-proxy.js");
            }
        );
    });
    
  • User Avatar
    0
    SuperBeastX3 created

    Thanks, that worked for me.

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