Copying the uploaded files to a specific directory does not work!

Last post 12-13-2008, 9:47 AM by cutechat. 1 replies.
Sort Posts: Previous Next
  •  12-10-2008, 5:08 AM 46731

    Copying the uploaded files to a specific directory does not work!

    Hi, I'm trying to copy the uploaded files to a specific directory but failed, ASP.NET user has write permission on that directory, here is my code:
     
     

    Protected Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs) Handles Uploader1.FileUploaded

    uploadcount += 1

    Dim uploader As CuteWebUI.Uploader = DirectCast(sender, CuteWebUI.Uploader)

    InsertMsg("File uploaded! " & args.FileName & ", " & args.FileSize & " bytes.")

    'Copys the uploaded file to a new location.

    args.CopyTo("E:\Projects\myproj\")

    End Sub

  •  12-13-2008, 9:47 AM 46890 in reply to 46731

    Re: Copying the uploaded files to a specific directory does not work!

    Hi,
     
    you should not specify the directory , you need provide the fullpath :
     
    args.CopyTo("E:\Projects\myproj\" & args.FileName )
     
    Regards,
    Terry
View as RSS news feed in XML