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

Get full path from uplad control

3 Answers 610 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
lakmal
Top achievements
Rank 2
lakmal asked on 23 Dec 2009, 08:28 AM
Hi,

How can i take full file path from upload control. ?
this return  RadUpload1.UploadedFiles[0].FileName
only file name

lakmal

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Dec 2009, 11:08 AM
Hi Lakmal,

The client-site path is based on the browser that you are using. In IE6 and some older browsers FileName property of UploadedFile returns full path. Checkout the following forum link for more information.
How to get a full path of each selection

-Shinu.
0
lakmal
Top achievements
Rank 2
answered on 23 Dec 2009, 05:48 PM
hi,

I cant depend on browsers. That link is not hep me to get file full path

lakmal
0
Genady Sergeev
Telerik team
answered on 24 Dec 2009, 03:48 PM
Hi lakmal,

It is not possible to obtain the  file path on the client due to security reasons. In order to craft the serverside path for saving files you can use the following code:

string fullPath = Path.Combine(Server.MapPath("Your upload folder"), uploadedFile.GetName());


Greetings,
Genady Sergeev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Upload (Obsolete)
Asked by
lakmal
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
lakmal
Top achievements
Rank 2
Genady Sergeev
Telerik team
Share this question
or