Controlling File length in RadAsyncUpload is possible

4 posts, 1 answers
  1. Geetha
    Geetha avatar
    13 posts
    Member since:
    Jul 2012

    Posted 10 Oct 2012 Link to this post

    Hi All,

                I am using RadAsyncUpload telerik control to upload the files. Here is the code.

    <telerik:RadAsyncUpload runat="server" ID="rdUpload1" MultipleFileSelection="Disabled" ControlObjectsVisibility="None"    MaxFileInputsCount="1" OnClientFileUploaded="fileUploaded" Height="18px" AllowedFileExtensions="jpg,png,gif" OnClientValidationFailed="validationFailed" Width="85px"> 
        <Localization Select="Browse" />
        </telerik:RadAsyncUpload>
        <style type="text/css">       
        .RadUpload  .ruRemove
            {
        display:none
            }
        </style>

    I wanted to display only first three characters of the file name, when it is uploading the file and after it uploads the file. Is it possible? If yes, can you please let me know. how to do it?


    Thanks,
    Geetha Rani.

     
  2. Answer
    Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 10 Oct 2012 Link to this post

    Hello,

    function Test() {
                   if ($(".ruUploadSuccess").length > 0) {
                       $(".ruUploadSuccess").get(0).innerHTML = $(".ruUploadSuccess").get(0).innerHTML.substring(0, 3);
                   }
               }
     
               setInterval(function () { Test(); }, 500);


    //OR


    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Geetha
    Geetha avatar
    13 posts
    Member since:
    Jul 2012

    Posted 10 Oct 2012 Link to this post

    Thanks Jayesh. It solved my issue.
  5. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 12 Oct 2012 Link to this post

    Hi Geetha,

    You could also use OnClientFileUploaded event and change the rendered name in the current row.

    Regards,
    Peter Filipov
    the Telerik team
    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 their blog feed now.
Back to Top