Search Results for

# Legacy Uploader

Uploader is the main compatibility wrapper for older 4.x single-file and multi-file upload pages.

It is built on top of AjaxFileUpload, so the runtime is modern even though the public API is legacy-friendly.

## Typical markup

    <%@ Register Assembly="AjaxUploader" Namespace="CuteWebUI" TagPrefix="CuteWebUI" %>

    <CuteWebUI:Uploader ID="Uploader1" runat="server"
        InsertText="Upload files"
        MultipleFilesUpload="true"
        ManualStartUpload="false"
        ShowProgressBar="true"
        ShowQueueTable="true"
        OnFileUploaded="Uploader1_FileUploaded"
        OnUploadCompleted="Uploader1_UploadCompleted">
        <ValidateOption AllowedFileExtensions="jpg,png,pdf,zip" MaxSizeKB="10240" />
    </CuteWebUI:Uploader>

## Typical code-behind

    protected void Uploader1_FileUploaded(object sender, CuteWebUI.UploaderEventArgs e)
    {
        var targetFolder = Server.MapPath("~/App_Data/Processed");
        System.IO.Directory.CreateDirectory(targetFolder);

        e.CopyTo(System.IO.Path.Combine(targetFolder, e.FileName));
    }

    protected void Uploader1_UploadCompleted(object sender, CuteWebUI.UploaderEventArgs[] files)
    {
        lblStatus.Text = "Uploaded " + files.Length + " file(s).";
    }

## Most-used members

Legacy member | What it does
--- | ---
`InsertText` | Browse button caption
`MultipleFilesUpload` | Enables multi-file selection
`ManualStartUpload` | Switches between automatic and manual upload start
`ShowProgressBar` | Shows the progress UI
`ShowQueueTable` | Shows the uploaded file queue
`MaxFilesLimit` | Limits the number of selected files
`ValidateOption` | Holds size, extension, MIME, and regex validation rules
`FileUploaded` | Fires for each uploaded file
`UploadCompleted` | Fires after the current batch completes

## Automatic postback (4.x parity)

Like the 4.x control, Uploader posts back automatically when the upload batch finishes, so `FileUploaded` and `UploadCompleted` fire on the server with no submit button and no extra wiring. This is on by default for the legacy control. If a normal submit button already drives your form and you do not want the automatic postback, set `AutoPostBack="false"` in the markup.

## Important compatibility note

Properties such as `UploadType`, `FlashLoadMode`, and other plugin-era flags are kept for source compatibility. They still compile, but the v5 runtime remains HTML5-based.

## When to modernize

If you are building a new page instead of upgrading an old one, prefer AjaxFileUpload.