简体   繁体   中英

get full path through file uploader in Telerik

I am using telerik controls in asp.net

For uploading a file i am using, RadUpload

I gone through following links:

http://www.telerik.com/community/forums/aspnet-ajax/upload/get-full-path-from-uplad-control.aspx#1044702

http://www.telerik.com/community/forums/aspnet-ajax/async-upload/how-to-get-full-path-using-radasyncupload-control.aspx

Made Code As Follows:

for (int i = 0; i < RadUpload1.UploadedFiles.Count; i++)
            {
                string fileName= Server.MapPath( RadUpload1.UploadedFiles[i].GetName());
            }

Its giving me path:

E:\WebBasedNewSoft\NewSoft\NewSoft\colnames.xlsx

this is the path where my solution files are stored.

I wanted to get path of file selected for upload.

Eg. if uploaded file is on c drive , it should give me path:

C:\colnames.xlsx

But its not giving me appropriate path.

What mistake am i making?

What should be appropriate line in for loop??

Please help me.

The file path will NEVER contain the path of the client's computers, because the software on the server is never allowed to take a peek inside the clients computer. If the server was alles to see inside the clients computer we would have a security issue.

The path you are getting is the local path at the server to where the file has been uploaded.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM