Re: Removing Uploaded Files in the Temporary File Location

  •  11-18-2009, 6:26 AM

    Re: Removing Uploaded Files in the Temporary File Location

    hi ArchSI,
     
    You can do this in event FileUploaded, like below.
     
         <CuteWebUI:UploadAttachments ID="attachment1" runat="server" OnFileUploaded="attachment1_FileUploaded" TempDirectory="~/haha">
            </CuteWebUI:UploadAttachments>

        protected void attachment1_FileUploaded(object sender, UploaderEventArgs args)
        {
             //save upload file to another folder
             //you can change the upload file name here, like args.CopyTo("~/savefolder/"+"myname.jpg");
            args.CopyTo("~/savefolder/"+args.FileName);
             //delete the tem files in folder C:\\Temp
            args.Delete();
        }
     
    Regards,
     
    ken
View Complete Thread