Folder Drop - VB.NET

Demo uploads land in a temporary store and are swept after 60 minutes. To keep files, handle FileUploaded — see Single File for the complete save pattern.
Recreate the dropped folder tree, in VB.NET

Drop a folder (or browse a directory) and each file arrives with its relative path preserved. The VB handler recreates the structure under App_Data/FolderDemoVB using e.RelativePath - one Path.Combine and one CreateDirectory.

What you should see: drop a nested folder; after the automatic postback the list names each file's preserved path, and the same tree exists on disk under App_Data/FolderDemoVB.
Drag & drop files here, or paste from clipboard
    Protected Sub Uploader1_FileUploaded(ByVal sender As Object,
            ByVal e As AjaxUploader.Events.FileUploadedEventArgs)
        ' e.RelativePath is sanitized server-side; Nothing for plain files
        Dim relative As String = If(e.RelativePath,
            System.IO.Path.GetFileName(If(e.FileName, "file")))
        Dim destination As String = System.IO.Path.Combine(
            Server.MapPath("~/App_Data/FolderDemoVB"), relative.Replace("/"c, "\"c))
    
        System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(destination))
        Dim svc As New AjaxUploader.Services.UploadService()
        svc.CopyFile(e.FileGuid, destination)
    End Sub