file extensions

13 posts, 0 answers
  1. Jakub Wilk
    Jakub Wilk avatar
    32 posts
    Member since:
    Nov 2003

    Posted 17 Jan 2008 Link to this post

    Hi,
    how can I add *.chm extension to RadEditorProm Document Maganer so I was able to insert *.chm files using DocManager.
  2. Rumen
    Admin
    Rumen avatar
    14032 posts

    Posted 17 Jan 2008 Link to this post

    Hi Jakub,

    You should set the DocumentManager-SearchPatterns property to "*.chm". Here is an example;

    <telerik:RadEditor id="RadEditor1"
        DocumentManager-ViewPaths="~/Docs"
        DocumentManager-UploadPaths="~/Docs"
        DocumentManager-SearchPatterns="*.chm,*.doc,*.pdf"
        runat="server">
    </telerik:RadEditor>   

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Daniel Frumkin
    Daniel Frumkin avatar
    19 posts
    Member since:
    Jun 2004

    Posted 22 Jul 2008 Link to this post

    I get the error as:
    The extension of the uploaded file is not valid. Please, provide a valid file!
  4. Rumen
    Admin
    Rumen avatar
    14032 posts

    Posted 22 Jul 2008 Link to this post

    Hi Daniel,

    I tried the provided solution and it worked properly with the Q1 SP2 release of Telerik.Web.UI.dll. You can see my test in the attached video. For your convenience I have attached my test project as well.

    Do you still experience this problem?


    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Daniel Frumkin
    Daniel Frumkin avatar
    19 posts
    Member since:
    Jun 2004

    Posted 22 Jul 2008 Link to this post

    this is using the most recent version of Radeditor for Ajax

    It still doesn't working using the same codebase. i have screenshots i can mail you.
  6. Daniel Frumkin
    Daniel Frumkin avatar
    19 posts
    Member since:
    Jun 2004

    Posted 22 Jul 2008 Link to this post

    My Aspx code:

    <%@ Control Language="VB" AutoEventWireup="false" CodeFile="DealerManager.ascx.vb" Inherits="common_controls_content_PH_DealerManager" %> 
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    Page Content: 
     
    <telerik:RadEditor ID="dealerEditor" ContentAreaCssFile="~/content/css/content.css"  
    runat="server"  
    AllowScripts="True"  
    AutoResizeHeight="True"  
    Height="700px"  
    StripFormattingOnPaste="AllExceptNewLines"  
    StripFormattingOptions="AllExceptNewLines" ToolProviderID=""  
    ToolsFile="~/RadControls/Editor/ToolsFie.xml"  
     DocumentManager-SearchPatterns="*.doc, *.txt, *.docx, *.xls, *.xlsx, *.pdf, *.zip"
        <Content> 
    </Content> 
    </telerik:RadEditor> 
    <br /> 
    Current Password: 
    <telerik:RadTextBox ID="txtPassword" runat="server" Skin="Office2007"
    </telerik:RadTextBox> 
     
     
     
     
    Partial Class common_controls_content_PH_DealerManager 
        Inherits CodeBehind.BaseDataControl 
     
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
            Dim thisDealerText As New SubData.SitePageContent(SubData.SitePageContent.Columns.PageName, "DealerPage") 
            Me.dealerEditor.Content = thisDealerText.PageContent 
            Dim filesAvailable(0) As String 
            filesAvailable(0) = "/files_Dealer" 
            Me.dealerEditor.DocumentManager.UploadPaths = filesAvailable 
            Me.dealerEditor.DocumentManager.ViewPaths = filesAvailable 
            Me.dealerEditor.DocumentManager.DeletePaths = filesAvailable 
            Me.dealerEditor.ImageManager.UploadPaths = filesAvailable 
            Me.dealerEditor.ImageManager.ViewPaths = filesAvailable 
            Me.dealerEditor.ImageManager.DeletePaths = filesAvailable 
            Me.dealerEditor.CssFiles.Add("~/content/css/content.css") 
            Me.dealerEditor.DocumentManager.MaxUploadFileSize = 20000000 
            Me.dealerEditor.ImageManager.MaxUploadFileSize = 20000000 
          '  Me.dealerEditor.DocumentManager.SearchPatterns = str.Split(",") 
     
        End Sub 
    End Class 

  7. Rumen
    Admin
    Rumen avatar
    14032 posts

    Posted 25 Jul 2008 Link to this post

    Hi Daniel,

    Thank you for providing your editor's declaration. I examined it and found that you have put spaces between the different file type values of the DocumentManager-SearchPatterns property

     DocumentManager-SearchPatterns="*.doc,*.txt, *.docx, *.xls, *.xlsx, *.pdf, *.zip">

    which is causing the upload problem. The correct syntax for specifying the file types is by not putting space symbols, e.g.

     DocumentManager-SearchPatterns="*.doc,*.txt,*.docx,*.xls,*.xlsx,*.pdf,*.zip">

    This change will fix the problem.

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 14 Feb 2009 Link to this post

    If you omit the *., it shows the right files so you can select one to upload, but when you try to actually upload, it says "The extension of the uploaded file is not valid. Please, provide a valid file!"  This is for the image manager, but Ill bet the document manager does the same.  I'm using CA 2008.

    Here is an example.  As I said, it works for selecting, but fails for uploading.
     
    DocumentManager-SearchPatterns="doc,txt,docx,xls,xlsx,pdf,zip">
  9. Rumen
    Admin
    Rumen avatar
    14032 posts

    Posted 17 Feb 2009 Link to this post

    Hi James,

    The syntax that you are using "doc,txt,docx,xls,xlsx,pdf,zip" is not valid and for that reason the Document manager does not work as expected. To be able to upload the specified files in the DocumentManager-SearchPatterns property, you should also add the *. symbols to the beginning of the each file extension, e.g.

     DocumentManager-SearchPatterns="*.doc,*.txt,*.docx,*.xls,*.xlsx,*.pdf,*.zip"

    Best regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  10. Max
    Max avatar
    4 posts
    Member since:
    Jan 2011

    Posted 22 Jul 2013 Link to this post

    Hi Rumen,

    I found this issue and have same problem. To view files you dont add asterisk(star) but to actually upload you must have it.
    To resolve this issue I added both. I am using FTP provide described here

     

     

     http://www.telerik.com/support/kb/aspnet-ajax/fileexplorer/ftpcontentprovider.aspx

     

    For example if I use this code so I can see PDF and  can upload PDF

     

     


    RadEditor1.DocumentManager.SearchPatterns = new[] { "pdf", "*.pdf" };


    Thanks,

    Max

     

  11. Ianko
    Admin
    Ianko avatar
    1894 posts

    Posted 24 Jul 2013 Link to this post

    Hello Max,

    In the current version of RadControls the search patterns works as expected and only with the syntax with the asterisk in front of the extension. Example: {"*.jpg", "*.pdf"}. 

    The other syntax - without the asterisk will throw errors for all files that are being uploaded.

    I am attaching a sample clip showing the behavior of the Document manager with both syntaxes.

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  12. Max
    Max avatar
    4 posts
    Member since:
    Jan 2011

    Posted 24 Jul 2013 Link to this post

    Hi Lanko,

    I have tested it and if you want that FTP provider to work properly you have to include both with and without asterisk.


    Please test it to verify.

    Also for all those who have this issue try this workaround.

    Thanks,
    Max.

  13. Ianko
    Admin
    Ianko avatar
    1894 posts

    Posted 29 Jul 2013 Link to this post

    Hi Max,

    I am sorry for misunderstanding you about the issue with the FTP provider. I contacted a college who is informed about this behavior and he confirmed, that this is the way to use this custom provider.

    I can assure you that this is not a bug in the RadEditor nor the RadFileExplorer, but a characteristic about using the third-party provider.

    Do not hesitate to contact us about other concerns with our products.

    Regards,
    Ianko
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top