FileManager (v2021)

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
darkdragon
User
Posts: 148

FileManager (v2021)

Post by darkdragon »

Hi,

I have activated the FileManager extension in order to use it with CKEditor.
Now, the name of the folder configured in UserFilesPath it is not created under the global uploads/ folder, but rather on the D:\ drive.

Let me explain. I have a folder named D:\APPS which binds to the default IIS root site.
Inside this folder, let's assume a sub-folder named Project-1. This is where I keep the project.agx file and below this, in bin\...\publish is where the project is being published.
Now, in IIS, http://localhost/project-1 is binded to the D:\APPS\Project-1\bin\Debug\net5.0\publish\ folder. This is a set-up which works perfectly for me.

I do not get it, how the FileManager creates on the D:\ drive a folder named project-1 and inside it a sub-folder named as configured in UserFilesPath setting.

Anyone experienced this?


MichaelG
User
Posts: 1095

Post by MichaelG »

According to the extension notes (Tools -> Extensions (FileManager) -> Notes):

UserFilesPath - A folder under the global upload folder (under PHP -> General Options -> File Upload tab, see PHP Settings in the help file), e.g. if the global upload folder is "uploads/" (relative to project folder) and "UserFilesPath" is "userfiles", then the user file folder is "uploads/userfiles" (relative to project folder). If "UserFilesPath" not specified, the global upload folder will be used. Make sure you have setup write permssions for the upload folder properly. Default is "userfiles".

Please check if you have set up the Upload Folder (ASP.NET -> General Options -> File Upload -> Upload Folder) correctly.


darkdragon
User
Posts: 148

Post by darkdragon »

I have set-up the uploads folder correctly, "uploads/" , the uploads folder is named "uploads". Uploads are created in this folder relative to wwwroot.
My issue is the UserFilesPath setting which is not relative to the uploads folder, but is being created outside the project path.


MichaelG
User
Posts: 1095

Post by MichaelG »

To debug the issue, run your generated application in Visual Studio and add a break point to the constructor of "Controllers/FileManagerController.cs". See if the path is correct.

    public FilemanagerController(IWebHostEnvironment env)
    {
        // ...

Post Reply