BEST
DEALS
OF THE
YEAR!
SAVE UP TO $3,000
24 NOV
1 DEC
00 Days
00 Hrs
00 Min
00 Sec
Open Closed

File Management Module issue when running from virtual dir #5687


User avatar
0
rwright-ruhealth created
  • ABP Framework version: v7.3.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Layered MVC
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • Create an application with ABP Suite commercial using Book example. Fix everything up script wise and pagewise to respect the virtual app path "https://myhost/myapp"- Everything works fine.
  • Add File Management Module via ABP Suite CLI,
  • Launch website at https://localhost/myapp and navigate to File Management from the Menu.
  • Attempt to add a Folder. Nothing happens. browser debugger shows script is not found, because file manager is looking for it in the root of the site at https://myhost/Pages/FileManagement/Directory/createModal.js
  • instead of
  • https://myhost/myapp/Pages/FileManagement/Directory/createModal.js
  • This seems to be hard-coded in the package setup.
  • How can I override the FileManagement script path for Virtual dir / Sub applications?

Thanks.


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

    Hi,

    It's a problem, we will fix it. your ticket refunded

    You can try to override the abp.ResourceLoader._loadScript javascript method:

    abp.ResourceLoader._loadScript = function (url, loadCallback, failCallback) {
    
        if(url.startsWith("/Pages/FileManagement")){
            url = abp.appPath + url.substring(1);
        }
    
        var nonce = document.body.nonce || document.body.getAttribute('nonce');
        _loadFromUrl(url, loadCallback, failCallback, function (urlInfo) {
            $.get({
                url: url,
                dataType: 'text'
            })
            .done(function (script) {
                if(nonce){
                    $.globalEval(script, { nonce: nonce});
                }else{
                    $.globalEval(script);
                }
                urlInfo.succeed();
            })
            .fail(function () {
                urlInfo.failed();
            });
        });
    };
    
  • User Avatar
    0
    rwright-ruhealth created

    ABP: To solve the problem as a commercial user, I downloaded and modified the source code for File Manager and that seems to solve all problems. Thank you.

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 20, 2025, 09:12
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.