Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
3 views

Hi,

I'm using RadFileExplorer in a project that includes file version control. Occasionally, when attempting to save a new version of a file, I receive the alert:
"A file with a name same as the target already exists!"

This issue seems inconsistent — it doesn't appear limited to a specific file type, but I've noticed it more frequently with image files or files that have numbers in their names.

I came across a possible solution in this File Explorer as a Version Control issues. in UI for ASP.NET AJAX | Telerik Forums, where it was suggested to modify the GetFIle method to always return null. Here's the method :

public override Stream GetFile(string url)
{
    string virtualPath = RemoveProtocolNameAndServerName(url);
    string physicalPath = this.GetPhysicalFromVirtualPath(virtualPath);
    if (physicalPath == null)
        return null;

    if (!File.Exists(physicalPath))
    {
        return null;
    }

    return File.OpenRead(physicalPath);
}

if it is okay to overriding this method to always return null? Is it a safe and recommended approach to prevent the "file already exists" error in version control scenarios?
Kavindu
Top achievements
Rank 1
 asked on 02 May 2025
1 answer
15 views
I'm trying to add a alert inside the FileStore method in Telerik's File Explorer, but it's not working as expected. Here's my implementation:

public override string StoreFile(UploadedFile file, string path, string name, params string[] arguments)
{          
    string physicalPath = this.GetPhysicalFromVirtualPath(path);
    if (physicalPath == null)
        return string.Empty;

    Directory.CreateDirectory(physicalPath);

    // sanitize the file name
    name = (name.Replace(" ", "_")).Replace("'", string.Empty);
    physicalPath = PathHelper.AddEndingSlash(physicalPath, '\\') + name;
    
    string fileName = Path.GetFileName(physicalPath);
    string folderPath = Path.GetDirectoryName(physicalPath);
      
    FileStorageManager fileStorageManager = new FileStorageManager();
    FileStorageInformation fileInfo = fileStorageManager.GetFileByFolderAndFileName(_applicationID, folderPath, fileName);

    string fileFolderRelativeToRoot = path;
    string rootToThisContext = path;
    string message = null;

    if (File.Exists(physicalPath))
    {
        bool isVersioningDisabledOnDestination = false;
        UploadingHandler uploadingHandler = new UploadingHandler();
        uploadingHandler.ExecuteAction(fileInfo, fileName, fileFolderRelativeToRoot, rootToThisContext, _applicationID, _formID, _userID, ref isVersioningDisabledOnDestination);

        if (isVersioningDisabledOnDestination)
        {
            message = string.Format("Can not upload - versioning not enabled on target folder");
        }
    }

    if(message == null)
    {
        file.SaveAs(physicalPath);

        return PathHelper.AddEndingSlash(path, '/') + name;
    }
    else
    {
        return message;
    }         
}
Rumen
Telerik team
 answered on 28 Mar 2025
2 answers
282 views

I am getting error "You are trying to navigate to a non-existing folder or you do not have proper permissions to view this folder.
Please, contact the administrator." in my production environment. It is happening randomly. 

 

Thanks.

Fit2Page
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 11 Mar 2025
2 answers
27 views

I am able to drag and drop a message from old Outlook into Telerik File Explorer, but I can not do that in new Outlook. I am not sure if Telerik File Explore support that. And does Telerik File Explore support copy paste out look messages. 

Rumen
Telerik team
 answered on 23 Jan 2025
4 answers
48 views

I try to use

         <telerik:RadFileExplorer ID="RadFileExplorer1" Runat="server" EnableEmbeddedSkins="True"
             InitialPath="\\network\EL00394132">
             <Configuration ViewPaths="\\network\EL00394132" 
                 DeletePaths="\\network\EL00394132" 
                 UploadPaths="\\network\EL00394132" SearchPatterns="*.*"/>
        </telerik:RadFileExplorer>

 

access a network shared folder by creating my own FileBrowserContentProvider 

            this.RadFileExplorer1.Configuration.ContentProviderTypeName = typeof(Extensions.NetworkShareProvider).AssemblyQualifiedName;

It can view files

 

But when I try to upload a file

 

After click Upload button, it triggers my own FileBrowserContentProvider class

but no files are being uploaded, then get an error

 

it dose not trigger

 

How to fix? Please help !

Rumen
Telerik team
 answered on 22 Nov 2024
1 answer
56 views

When I try to open a file I'd like to be able to click on a link to an Excel file and have it open directly in Excel on my computer, without any intermediate popup windows. Is this possible? or download to local?

Rumen
Telerik team
 answered on 22 Nov 2024
1 answer
44 views
How to make this "Drop Files Here" zone bigger?



Rumen
Telerik team
 answered on 22 Nov 2024
1 answer
79 views

When try upload file/image i got error "check image"


        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />

<telerik:RadEditor ID="RadEditor1" runat="server" SkinID="BasicSetOfTools" Height="500px" ContentFilters="DefaultFilters,PdfExportFilter" ContentAreaMode="Div" NewLineMode="Br, P" ExternalDialogsPath="~/EditorDialogs" EnableResize="False"><ExportSettings OpenInNewWindow="True"></ExportSettings><Tools><telerik:EditorToolGroup Tag="MainToolbar"><telerik:EditorTool Name="XhtmlValidator" /><telerik:EditorTool Name="PageProperties" /><telerik:EditorTool Name="StyleBuilder" /><telerik:EditorTool Name="TrackChangesDialog" /><telerik:EditorTool Name="FormatCodeBlock" /><telerik:EditorSeparator /><telerik:EditorTool Name="InsertImage" /><telerik:EditorTool Name="InsertLink" /><telerik:EditorTool Name="InsertTableLight" /><telerik:EditorSeparator /><telerik:EditorToolStrip Name="InsertFormElement"></telerik:EditorToolStrip><telerik:EditorTool Name="InsertFormForm" /><telerik:EditorTool Name="InsertFormButton" /><telerik:EditorTool Name="InsertFormCheckbox" /><telerik:EditorTool Name="InsertFormHidden" /><telerik:EditorTool Name="InsertFormPassword" /><telerik:EditorTool Name="InsertFormRadio" /><telerik:EditorTool Name="InsertFormReset" /><telerik:EditorTool Name="InsertFormSelect" /><telerik:EditorTool Name="InsertFormSubmit" /><telerik:EditorTool Name="InsertFormTextarea" /><telerik:EditorTool Name="InsertFormText" /><telerik:EditorSeparator /><telerik:EditorTool Name="StripAll" /><telerik:EditorTool Name="StripCss" /><telerik:EditorTool Name="StripFont" /><telerik:EditorTool Name="StripSpan" /><telerik:EditorTool Name="StripWord" /></telerik:EditorToolGroup><telerik:EditorToolGroup Tag="InsertToolbar"><telerik:EditorTool Name="ImageManager" ShortCut="CTRL+M" /><telerik:EditorTool Name="ImageMapDialog" /><telerik:EditorSeparator /><telerik:EditorTool Name="FlashManager" /><telerik:EditorTool Name="MediaManager" /><telerik:EditorTool Name="InsertExternalVideo" /><telerik:EditorSeparator /><telerik:EditorTool Name="DocumentManager" /><telerik:EditorTool Name="TemplateManager" /><telerik:EditorSeparator /><telerik:EditorToolStrip Name="InsertTable"></telerik:EditorToolStrip><telerik:EditorTool Name="InsertRowAbove" /><telerik:EditorTool Name="InsertRowBelow" /><telerik:EditorTool Name="DeleteRow" /><telerik:EditorTool Name="InsertColumnLeft" /><telerik:EditorTool Name="InsertColumnRight" /><telerik:EditorTool Name="DeleteColumn" /><telerik:EditorSeparator /><telerik:EditorTool Name="MergeColumns" /><telerik:EditorTool Name="MergeRows" /><telerik:EditorSeparator /><telerik:EditorTool Name="SplitCellHorizontal" /><telerik:EditorTool Name="SplitCell" /><telerik:EditorTool Name="DeleteCell" /><telerik:EditorTool Name="SetCellProperties" /><telerik:EditorTool Name="SetTableProperties" /><telerik:EditorSeparator /><telerik:EditorSplitButton Name="InsertSymbol"></telerik:EditorSplitButton><telerik:EditorToolStrip Name="FormatStripper"></telerik:EditorToolStrip></telerik:EditorToolGroup><telerik:EditorToolGroup><telerik:EditorSplitButton Name="Undo"></telerik:EditorSplitButton><telerik:EditorSplitButton Name="Redo"></telerik:EditorSplitButton><telerik:EditorSeparator /><telerik:EditorTool Name="Cut" /><telerik:EditorTool Name="Copy" /><telerik:EditorTool Name="Paste" ShortCut="CTRL+V" /><telerik:EditorSeparator /><telerik:EditorTool Name="PasteFromWord" /><telerik:EditorTool Name="PasteFromWordNoFontsNoSizes" /><telerik:EditorTool Name="PastePlainText" /><telerik:EditorTool Name="PasteAsHtml" /><telerik:EditorTool Name="PasteHtml" /><telerik:EditorSeparator /><telerik:EditorTool Name="Print" /><telerik:EditorTool Name="FindAndReplace" /><telerik:EditorTool Name="SelectAll" /><telerik:EditorSeparator /><telerik:EditorTool Name="InsertGroupbox" /><telerik:EditorTool Name="InsertParagraph" /><telerik:EditorTool Name="InsertHorizontalRule" /><telerik:EditorSplitButton Name="InsertSnippet"></telerik:EditorSplitButton><telerik:EditorSeparator /><telerik:EditorTool Name="InsertDate" /><telerik:EditorTool Name="InsertTime" /><telerik:EditorSeparator /><telerik:EditorTool Name="AboutDialog" /><telerik:EditorTool Name="Help" /></telerik:EditorToolGroup><telerik:EditorToolGroup><telerik:EditorTool Name="Bold" /><telerik:EditorTool Name="Italic" /><telerik:EditorTool Name="Underline" /><telerik:EditorTool Name="StrikeThrough" /><telerik:EditorSeparator /><telerik:EditorTool Name="JustifyLeft" /><telerik:EditorTool Name="JustifyCenter" /><telerik:EditorTool Name="JustifyRight" /><telerik:EditorTool Name="JustifyFull" /><telerik:EditorTool Name="JustifyNone" /><telerik:EditorSeparator /><telerik:EditorTool Name="Superscript" /><telerik:EditorTool Name="Subscript" /><telerik:EditorSeparator /><telerik:EditorTool Name="ConvertToLower" /><telerik:EditorTool Name="ConvertToUpper" /><telerik:EditorTool Name="Indent" /><telerik:EditorTool Name="Outdent" /><telerik:EditorTool Name="InsertOrderedList" /><telerik:EditorTool Name="InsertUnorderedList" /><telerik:EditorTool Name="AbsolutePosition" /><telerik:EditorTool Name="InsertSpecialLink" Text="Insert Special Link"/><telerik:EditorTool Name="LinkManager" /><telerik:EditorTool Name="Unlink" /><telerik:EditorTool Name="ToggleTableBorder" /><telerik:EditorTool Name="ToggleScreenMode" /></telerik:EditorToolGroup><telerik:EditorToolGroup Tag="DropdownToolbar"><telerik:EditorSplitButton Name="ForeColor"></telerik:EditorSplitButton><telerik:EditorSplitButton Name="BackColor"></telerik:EditorSplitButton><telerik:EditorSeparator /><telerik:EditorDropDown Name="FontName"></telerik:EditorDropDown><telerik:EditorDropDown Name="FontSize"></telerik:EditorDropDown><telerik:EditorDropDown Name="RealFontSize"></telerik:EditorDropDown><telerik:EditorDropDown Name="ApplyClass"></telerik:EditorDropDown><telerik:EditorDropDown Name="InsertCustomLink"></telerik:EditorDropDown><telerik:EditorDropDown Name="FormatBlock"></telerik:EditorDropDown><telerik:EditorDropDown Name="Zoom"></telerik:EditorDropDown></telerik:EditorToolGroup></Tools><Content></Content><ImageManager MaxUploadFileSize="9242880" DeletePaths="~/UpLoadImages" UploadPaths="~/UpLoadImages" ViewPaths="~/UpLoadImages" /><DocumentManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><FlashManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><SilverlightManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><MediaManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /><TemplateManager MaxUploadFileSize="9242880" DeletePaths="~/UploadFiles" UploadPaths="~/UploadFiles" ViewPaths="~/UploadFiles" /></telerik:RadEditor><script type="text/javascript"> Telerik.Web.UI.Editor.CommandList["InsertSpecialLink"] = function (commandName, editor, args) { var elem = editor.getSelectedElement(); //returns the selected element. if (elem.tagName == "A") { editor.selectElement(elem); argument = elem; } else { var content = editor.getSelectionHtml(); var link = editor.get_document().createElement("A"); link.innerHTML = content; argument = link; } var myCallbackFunction = function (sender, args) { editor.pasteHtml(String.format("<a href={0} target='{1}' class='{2}'>{3}</a> ", args.href, args.target, args.className, args.name)) } editor.showExternalDialog( 'InsertLink.aspx', argument, 870, 600, myCallbackFunction, null, 'Insert Link', true, Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move, false, false); }; </script>

 

 

Rumen
Telerik team
 answered on 07 May 2024
1 answer
63 views

With file explorer, I have no issues with creating a new folder with a string that contains a "&". The folder is created as expected.

But when I rename an existing folder to a string that contains a "&", the system will replace the "&" and "&amp;". This behaviour is shown in the fileexplorer demo :

https://demos.telerik.com/aspnet-ajax/fileexplorer/examples/overview/defaultcs.aspx

Rumen
Telerik team
 updated answer on 29 Mar 2024
1 answer
58 views

Is there a way to search for files in the directories when using the Document Manager/Image Manager.  I see some code samples that allow for filtering in the selected folder, however that only filters one level and not sub directories.  Looking for a way to search filenames through all sub folders.

 

Rumen
Telerik team
 answered on 21 Mar 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?