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

Changing filename at Selection is possible in AsyncUpload?

1 Answer 54 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Geetha
Top achievements
Rank 1
Geetha asked on 10 Oct 2012, 07:09 AM
Hi All,

            I am using RadASyncUpload control to upload the files. But I wanted to give my own name to the file, while uploading. Is it possible? If anybody knows, can you please let me know.


Thanks,
Geetha Rani.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Oct 2012, 04:03 AM
Hi Geetha,

Try the following code to achieve your scenario.

C#:
protected void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
{
 string targetFolder = RadAsyncUpload1.TargetFolder;
 e.File.SaveAs(Path.Combine(Server.MapPath(targetFolder), "newName" + e.File.GetExtension()));
}

Thanks,
Princy.
Tags
AsyncUpload
Asked by
Geetha
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or