+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Issue in Uploading image with LibraryManager.

Issue in Uploading image with LibraryManager.

3 posts, 1 answered
  1. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    01 Mar 2010
    Link to this post
    Hi,
    I created a custom module and I am uploading images into the image and documents.
     
    <telerik:RadUpload OnClientFileSelected="enableUploadBtnValidation" ID="RadUpload1" runat="server" EnableEmbeddedSkins="false" Skin="Sitefinity" InitialFileInputsCount="3" AllowedFileExtensions=".png, .jpeg, .jpg, .gif" ControlObjectsVisibility="AddButton" />

    The above code show in the AllowedFileExtensions I have bunch of extension and in the codebehind.

    Telerik.Libraries.LibraryManager libraryManager = new Telerik.Libraries.LibraryManager();

    Telerik.Cms.Engine.

    IContent newContent = libraryManager.CreateContent("image");

    Now the issue is that when I upload, it is only uploading the image with the first extension in the AllowedFileExtensions i.e. ".png" in this example and if I change the order to AllowedFileExtensions=".jpeg, .png, .jpg, .gif"  then it'll only upload "jpeg" file.

    I don't know how I will allow all the extentions to be uploaded.
    Please ASAP,

    Regards,
    Nimit Verma.

     

     



     

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    02 Mar 2010
    Link to this post
    Hello Nimit,

    Remove the whitespaces after the comma of each extension you have added.

    AllowedFileExtensions=".png,.jpeg,.jpg,.gif"

    You can specify the extension in the code-behind. Assign the value of the AllowedFileExtensions property to a string array:

    RadUpload1.AllowedFileExtensions = new string[] {".zip", ".jpg", ".jpeg"};

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
    Answered
  3. Nimit
    Nimit avatar
    90 posts
    Registered:
    27 Mar 2009
    02 Mar 2010
    Link to this post
    Hi Ivan,
    Thank you very much.

    Regards,
    Nimit Verma.
Register for webinar
3 posts, 1 answered