Re: Is it possible to set the upload file name in ajax uploader control

  •  01-18-2013, 1:00 PM

    Re: Is it possible to set the upload file name in ajax uploader control

    Hi mvjr,

     

    That is the temp file, you should not change this file name.

     

    You can save the upload file with a new name in event Fileuploaded, like below. args.FileName is the original file name, you can change it directly.

     

    1. void Uploader_FileUploaded(object sender, UploaderEventArgs args)  
    2.     {  
    3.         InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");  
    4.   
    5.         //Copies the uploaded file to a new location.  
    6.         args.CopyTo("~/"+args.FileName);  
    7.     }   
     

    More details of this event please refer to http://www.ajaxuploader.com/document/scr/html/How-to-save-uploaded-file.htm

     

    Regards,

     

    Ken 

View Complete Thread