the selected file is uploaded thousand of times

  •  04-29-2008, 5:39 PM

    the selected file is uploaded thousand of times

    This is what my code looks like (.aspx control decleration) <cutewebui:uploadattachments runat="server" id="upload_attachments" />
     

    Protected Overloads Overrides Sub OnInit(ByVal e As System.EventArgs)

    MyBase.OnInit(e)

    AddHandler upload_attachments.FileUploaded, AddressOf upload_attachments_file_uploaded

    End Sub

    Private Sub upload_attachments_file_uploaded(ByVal sender As Object, ByVal args As CuteWebUI.UploaderEventArgs)

    Dim stream As System.IO.Stream = args.OpenStream()

    Try

    upload_attachments.Upload(args.FileSize, args.FileName, stream)

    args.CopyTo("~/kb/article/" + Context.Request.QueryString("id"))

    Finally

    stream.Close()

    End Try

    End Sub

    Now the problem is that the file is uploaded over and over (4,000+) until i click stop on the browser, what am i doing wrong? all I want to do is once the file is uploaded to be copied over to the ~/kb/article/######/ directory.
     
    aslo the name of the file is in the GUID.filename.resx format, how can I make sure it keeps it's original name once its moved over to its proper directory.
     
    thank you for your time looking fordward to the solution.
     
View Complete Thread