Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Bugs & Issues > Issue in Uploading image with LibraryManager.

Issue in Uploading image with LibraryManager.

  • Nimit avatar

    Posted on Mar 1, 2010 (permalink)

    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.

     

     



     

     

    Reply

  • Answer Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Mar 2, 2010 (permalink)

    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.

    Reply

  • Nimit avatar

    Posted on Mar 2, 2010 (permalink)

    Hi Ivan,
    Thank you very much.

    Regards,
    Nimit Verma.

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Bugs & Issues > Issue in Uploading image with LibraryManager.