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

Set the path in the input control of asyncupload

1 Answer 15 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Freddy
Top achievements
Rank 1
Freddy asked on 31 Jul 2013, 05:48 PM
Hello

I added a RadAsyncUpload control to have the users upload their profile pics. Only one picture file is allowed to upload and how can I display the path as text in the upload textbox using js? I googled a several hundred times but didn't hit the right answer.

Thanks for reply,
Freddy

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 01 Aug 2013, 02:44 AM
Hi Freddy,

It is not possible to get the file name with its exact path on the client side. You can access the file name without the path by handling the OnClientFileSelected client event. The text field of RadAsyncUpload is an input element and its actually a fake element. Please have a look into the following JavaScript I tried to display the file name in the control's input element.

JavaScript:
<script type="text/javascript">
    var $ = $telerik.$;
    function OnClientFileUploaded(sender, args) {
        $('.ruFakeInput.radPreventDecorate').val(args.get_fileName());
    }
</script>

Thanks,
Shinu.
Tags
General Discussions
Asked by
Freddy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Share this question
or