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

Retrieve upload file path

3 Answers 58 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Liang
Top achievements
Rank 1
Liang asked on 01 Oct 2011, 04:47 PM
Hey,

Our team is currently using Telerik Silverlight Upload control. I would like t find out if we can retrieve the file path? Because we would like to store that information.

Thanks and regards,

Liang

3 Answers, 1 is accepted

Sort by
0
Alex Fidanov
Telerik team
answered on 05 Oct 2011, 11:46 AM
Hello Xliang,

Which path would you like to retrieve - the one on the client (Silverlight app) or on the server? You will not be able to get the client file path, because of security restrictions of silverlight. For the server file path (where the file is being uploaded) you can find with the RadUploadHandler's methods - GetFilePath, GetFileName.

Regards,
Alex Fidanov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Liang
Top achievements
Rank 1
answered on 05 Oct 2011, 05:01 PM
Thanks, Alex! We need to retrieve the path on client side. So you mean there is no way we can do? Because we need that information for audit purpose.

Thanks again,

0
Petar Mladenov
Telerik team
answered on 10 Oct 2011, 04:06 PM
Hi Xliang,

 Could you please examine this demo and especially the RadUpload_FileUploaded event handler in the Example.xaml.cs file on the client and let us know if this fits in your scenario ?

private void RadUpload_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            Uri uri = ConstructAbsoluteUri(new Uri(this.RadUpload1.UploadServiceUrl, UriKind.RelativeOrAbsolute));
            string imageURL = uri.AbsoluteUri.Remove(uri.AbsoluteUri.LastIndexOf("/")) +
                "/" + RadUpload1.TargetFolder + "/" + e.SelectedFile.Name;
 
.....
Please let us know if you need further assistance.

Best wishes,
Petar Mladenov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Upload
Asked by
Liang
Top achievements
Rank 1
Answers by
Alex Fidanov
Telerik team
Liang
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or