Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filemanager path properties is not working correctly #191

Open
invince opened this issue Dec 30, 2024 · 1 comment
Open

Filemanager path properties is not working correctly #191

invince opened this issue Dec 30, 2024 · 1 comment
Labels
file-manager File Manager control

Comments

@invince
Copy link

invince commented Dec 30, 2024

Hello,
I'm using ej2-angluar filemanager component.
image

When I set the path properties for ex /home/invince, the filemanager can open correctly the path, however when I click no matter folder or file in the page, it sends an incorrect path for read something like '//home//home//invince'
image

Here I click on Templates folder, the payload I send to backend becomes '//home//home//invince//Templates/'
image

After some debug, I guess something is wrong on @syncfusion\ej2-filemanager\src\file-manager\common\operations.js line 751 when generatePath(parent).
image

For me, no need generate it, cause parent already has path properties (no matter I set path or not, it has already value on it). NOTE: I use only angular version, maybe it's not the case for all.
I created a local patch myself, just comment that generatePath(parent), everything works well (no matter I set path or not for the component)

@gsumankumar gsumankumar added the file-manager File Manager control label Feb 10, 2025
@LeoLavanyaDhanaraj
Copy link

Hi,

Greetings from Syncfusion support.

Based on the details you provided, we understand that you are experiencing an issue with the path property of the FileManager component. To validate this issue on our end, we have prepared a sample using the property and followed the replication steps. However, the path value updates correctly without any issues.

We suspect that the issue may be due to the value assigned to the path attribute. To display files and folders correctly, you need to set an appropriate filter path for the path property (the traversal path of the current item from the root folder). Please ensure that the path is correctly configured on your end.

Sample : https://stackblitz.com/edit/angular-torvfsgr-4h1mggwr?file=src%2Fapp.component.html,src%2Fapp.component.ts

Provider ; https://github.com/SyncfusionExamples/ej2-aspcore-file-provider

[app.component.html]
<ejs-filemanager
id="overview"
[ajaxSettings]="ajaxSettings"
[toolbarSettings]="toolbarSettings"
[contextMenuSettings]="contextMenuSettings"
[path]="path"

[app.component.ts]
public path: string;
public ngOnInit(): void {
this.ajaxSettings = {
url: this.hostUrl + 'api/FileManager/FileOperations',
getImageUrl: this.hostUrl + 'api/FileManager/GetImage',
uploadUrl: this.hostUrl + 'api/FileManager/Upload',
downloadUrl: this.hostUrl + 'api/FileManager/Download',
}; …
this.path = '/Pictures/Food';
};

Output Screenshot:

Image

If you are still experiencing any issues, please provide a code snippet related to how the component is rendered, any customized code related to the path attribute, and customizations for the read action on the provider (type of provider). This information will help us investigate your query further and provide you with a prompt solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
file-manager File Manager control
Projects
None yet
Development

No branches or pull requests

3 participants