This is a migrated thread and some comments may be shown as answers.

Issue when rename file with wrong extension

1 Answer 7 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Andrea
Top achievements
Rank 1
Andrea asked on 13 Jun 2019, 12:30 PM

If you go at the demo https://demos.telerik.com/aspnet-ajax/fileexplorer/examples/server-sideapi/dbfilebrowsercontentprovider/defaultcs.aspx and try to rename the file with a extension that are not accepted (example ".txt" that are not in Configuration.SearchPatterns) you obtain the message "The selected folder could not be created because the application did not have enough permissions. Please, contact the administrator.".
The same error are displayed if you edit have the Configuration-AllowFileExtensionRename="false" and use a dot in the name of file.

This message are inappropriate for the context.

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 18 Jun 2019, 10:17 AM
Hi Andrea,

The faced behavior is related to the fact that when a file is renamed it is actually deleted and recreated with the new name. As the creating of the files with not allowed extensions is not possible, the control considers them as folders, which appears to be invalid as well due to the dots contained in the names, thus the faced error is thrown. If you decide, you can change the shown alert message by changing the value of the following localization string:
protected void Page_Load(object sender, EventArgs e)
{
    RadFileExplorer1.Localization.SetString("Common_NoPermissionsToCreateFolder", "aaaThe selected folder could not be created because the application did not have enough permissions. Please, contact the administrator.");
}


Regards,
Vessy
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
FileExplorer
Asked by
Andrea
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or