Retrieve upload file path

4 posts, 0 answers
  1. xliang
    xliang avatar
    3 posts
    Member since:
    Jul 2007

    Posted 01 Oct 2011 Link to this post

    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
  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 05 Oct 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. xliang
    xliang avatar
    3 posts
    Member since:
    Jul 2007

    Posted 05 Oct 2011 Link to this post

    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,

  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 10 Oct 2011 Link to this post

    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 >>

Back to Top