Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hello

i have radEditor in web Project.

i click to image manager in radEditor and upload file by Upload Botton. example my file is "MyFile.jpg". my file save in server path whit name "MyFile.jpg".

i want to Change filename after upload in server and save it. i write FileUpload event :

public bool RadEditor1_FileUpload(object sender, string fileName)

{

string FileNameTemp = fileName.Substring(fileName.LastIndexOf("/") + 1);


string strExtension = System.IO.Path.GetExtension(FileNameTemp);

FileNameTemp = FileNameTemp +
"-" + Guid.NewGuid() + strExtension;

fileName = fileName.Substring(0, fileName.LastIndexOf(
"/") + 1) + FileNameTemp;


return true;

}



please help me.
but file save yet whit name "MyFile.jpg".
Posted
Comments
Aravindba 22-Apr-14 2:53am    
Hi,u need to use handler for this,RadEditor1_FileUpload this event fires after file is uploaded,u need to handle this when file is uploading,so use handler for file uploading
Praveenkumar l 26-Apr-14 1:54am    
i cannot use the handler could u please give an example to use handler in this
thanq

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900