This is a migrated thread and some comments may be shown as answers.

Controlling File length in RadAsyncUpload is possible

3 Answers 39 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Geetha
Top achievements
Rank 1
Geetha asked on 10 Oct 2012, 05:54 AM
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.

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 10 Oct 2012, 11:28 AM
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
0
Geetha
Top achievements
Rank 1
answered on 10 Oct 2012, 01:33 PM
Thanks Jayesh. It solved my issue.
0
Peter Filipov
Telerik team
answered on 12 Oct 2012, 09:42 AM
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.
Tags
AsyncUpload
Asked by
Geetha
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Geetha
Top achievements
Rank 1
Peter Filipov
Telerik team
Share this question
or