Re: Can i change the temporary uploaded filename?

  •  10-07-2011, 7:31 AM

    Re: Can i change the temporary uploaded filename?

    Hi ScottDolan,
     
    Please use method "CopyTo" to save the upload file.
     
    <%@ Page Language="C#" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <script runat="server">

     
        protected void uploader1_FileUploaded(object sender, UploaderEventArgs args)
        {
            args.CopyTo("~/photos/"+args.FileName);
        }
    </script>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <div>
                <CuteWebUI:UploadAttachments ID="uploader1" runat="server" OnFileUploaded="uploader1_FileUploaded">
                </CuteWebUI:UploadAttachments>
            </div>
        </form>
    </body>
    </html>
     
     
    Regards,
     
    Ken
View Complete Thread