Class UploaderBase
Core legacy uploader compatibility control built on top of AjaxFileUpload.
Assembly: AjaxUploader.dll
Syntax
public class UploaderBase : AjaxFileUpload, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IPostBackDataHandler, IAjaxUploader
Constructors
UploaderBase()
Declaration
Fields
SharedStyleText
v4 parity: shared stylesheet text the legacy control emitted once per
page. v5 ships its CSS as a static web asset, so there is no inline
style block to hand back; the field exists so v4 code that reads or
assigns it still compiles and runs.
Declaration
public static string SharedStyleText
Field Value
UPLOAD_EXTENSION
v4 parity: extension used for the temp metadata file written alongside
an upload. Kept as a constant because v4 code composes paths with it.
Declaration
public const string UPLOAD_EXTENSION = "resx"
Field Value
Properties
AutoUseSystemTempFolder
Gets or sets whether the legacy control should prefer the system temporary folder.
Declaration
public bool AutoUseSystemTempFolder { get; set; }
Property Value
Declaration
public string ButtonOnClickScript { get; set; }
Property Value
CancelAllMsg
Declaration
public string CancelAllMsg { get; set; }
Property Value
Declaration
public string CancelButtonID { get; set; }
Property Value
CancelUploadMsg
Declaration
public string CancelUploadMsg { get; set; }
Property Value
DialogAccept
Declaration
public string DialogAccept { get; set; }
Property Value
DialogFilter
Declaration
public string DialogFilter { get; set; }
Property Value
DropZoneID
Declaration
public string DropZoneID { get; set; }
Property Value
EmitLegacyClientApi
Forwards the v4 per-control message properties to the client engine.
Declaration
protected override bool EmitLegacyClientApi { get; }
Property Value
Overrides
Declaration
public string FileTooLargeMsg { get; set; }
Property Value
FileTypeNotSupportMsg
Declaration
public string FileTypeNotSupportMsg { get; set; }
Property Value
FlashLoadMode
Declaration
public bool FlashLoadMode { get; set; }
Property Value
FlashUploadPage
Declaration
public string FlashUploadPage { get; set; }
Property Value
FlashWarningImage
Declaration
public string FlashWarningImage { get; set; }
Property Value
InputboxCSSText
Declaration
public string InputboxCSSText { get; set; }
Property Value
Declaration
public string InsertButtonID { get; set; }
Property Value
InsertText
Gets or sets the browse button caption shown by the legacy uploader.
Declaration
public string InsertText { get; set; }
Property Value
ManualStartUpload
Gets or sets whether uploads must be started manually.
Declaration
public bool ManualStartUpload { get; set; }
Property Value
MaxFilesLimit
Gets or sets the legacy maximum file count. A value of -1 means unlimited.
Declaration
public int MaxFilesLimit { get; set; }
Property Value
MaxFilesLimitMsg
Declaration
public string MaxFilesLimitMsg { get; set; }
Property Value
MultipleFilesUpload
Gets or sets whether the control allows multiple files to be selected.
Declaration
public bool MultipleFilesUpload { get; set; }
Property Value
NumFilesShowCancelAll
Declaration
public int NumFilesShowCancelAll { get; set; }
Property Value
NumFilesShowQueueUI
Declaration
public int NumFilesShowQueueUI { get; set; }
Property Value
ProgressBarBackgroundImage
Declaration
public string ProgressBarBackgroundImage { get; set; }
Property Value
ProgressBarBorderStyle
Declaration
public string ProgressBarBorderStyle { get; set; }
Property Value
ProgressBarColor
Declaration
public string ProgressBarColor { get; set; }
Property Value
ProgressBarHeight
Declaration
public int ProgressBarHeight { get; set; }
Property Value
ProgressBarStyle
Declaration
public ProgressBarType ProgressBarStyle { get; set; }
Property Value
ProgressCtrlID
Declaration
public string ProgressCtrlID { get; set; }
Property Value
ProgressInfoStyle
Declaration
public string ProgressInfoStyle { get; set; }
Property Value
ProgressPanelWidth
Declaration
public int ProgressPanelWidth { get; set; }
Property Value
ProgressPicture
Declaration
public string ProgressPicture { get; set; }
Property Value
ProgressTextID
Declaration
public string ProgressTextID { get; set; }
Property Value
ProgressTextTemplate
Declaration
public string ProgressTextTemplate { get; set; }
Property Value
QueuePanelID
Declaration
public string QueuePanelID { get; set; }
Property Value
Declaration
public bool ShowFrameBrowseButton { get; set; }
Property Value
ShowProgressBar
Gets or sets whether the progress bar area is displayed.
Declaration
public bool ShowProgressBar { get; set; }
Property Value
ShowProgressInfo
Declaration
public bool ShowProgressInfo { get; set; }
Property Value
ShowQueueTable
Gets or sets whether the queue table is displayed.
Declaration
public bool ShowQueueTable { get; set; }
Property Value
TempDirectory
Gets or sets the temporary upload directory used by the compatibility layer.
Declaration
public string TempDirectory { get; set; }
Property Value
Declaration
public string UploadAddonButtonImage { get; set; }
Property Value
Declaration
public UploadAddonButtonMode UploadAddonButtonMode { get; set; }
Property Value
UploadAddonButtonShowText
Declaration
public bool UploadAddonButtonShowText { get; set; }
Property Value
UploadAddonWarningImage
Declaration
public string UploadAddonWarningImage { get; set; }
Property Value
UploadCursor
Declaration
public UploadCursor UploadCursor { get; set; }
Property Value
UploadProcessingMsg
Declaration
public string UploadProcessingMsg { get; set; }
Property Value
UploadType
Declaration
public UploadType UploadType { get; set; }
Property Value
UploadTypePriority
Declaration
public string UploadTypePriority { get; set; }
Property Value
UploaderDebug
Declaration
public string UploaderDebug { get; set; }
Property Value
UploadingMsg
Declaration
public string UploadingMsg { get; set; }
Property Value
ValidateOption
Gets the legacy validation settings object.
Declaration
[PersistenceMode(PersistenceMode.InnerProperty)]
public UploaderValidateOption ValidateOption { get; }
Property Value
WindowsDialogLimitMsg
Declaration
public string WindowsDialogLimitMsg { get; set; }
Property Value
Methods
CheckPostBackData()
v3/v4 parity: forces the uploader to process its posted GUID list if ASP.NET
has not already done so, and raises the legacy events.
Declaration
public void CheckPostBackData()
GetAdvancedOption(UploaderAdvancedOption)
Returns the stored value for a legacy advanced option flag.
Declaration
public string GetAdvancedOption(UploaderAdvancedOption name)
Parameters
Returns
GetBrowserType()
Gets the current browser name from the active HTTP request.
Declaration
public string GetBrowserType()
Returns
GetBrowserVersion()
Gets the current browser version from the active HTTP request.
Declaration
public decimal GetBrowserVersion()
Returns
GetClientElementBindings()
v4 parity: forwards the element-binding IDs to the engine.
Declaration
protected override IDictionary<string, string> GetClientElementBindings()
Returns
Overrides
GetClientStringOverrides()
Returns per-instance client string overrides to merge into the engine's
strings option, or null for none.
Declaration
protected override IDictionary<string, string> GetClientStringOverrides()
Returns
Overrides
GetTempDirectory()
Gets the resolved temporary upload directory.
Declaration
public string GetTempDirectory()
Returns
GetUploadedFile(Guid)
Resolves an uploaded file by GUID and wraps it in the legacy MVC helper type.
Declaration
public MvcUploadFile GetUploadedFile(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
GetUploaderProvider()
Creates a legacy provider wrapper for accessing uploaded files.
Declaration
public UploaderProvider GetUploaderProvider()
Returns
Impersonate()
Returns a disposable impersonation scope placeholder kept for compatibility.
Declaration
public IDisposable Impersonate()
Returns
OnInit(EventArgs)
v4 (CuteWebUI) parity: the legacy Uploader posted back automatically
when the upload batch finished, so FileUploaded /
UploadCompleted fired with no submit button on the page. The
modern base posts back automatically when a server upload event is handled.
The legacy control continues to enforce that v4 behavior.
Without this, upgraded v4 code uploads successfully but its
FileUploaded handler never runs — the classic "saves nothing" report.
Declaration
protected override void OnInit(EventArgs e)
Parameters
Overrides
OnPreRender(EventArgs)
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Overrides
RaiseLegacyFileUploaded(Guid, string, int)
Declaration
protected void RaiseLegacyFileUploaded(Guid guid, string fileName, int fileSize)
Parameters
RaiseLegacyUploadCompleted(IEnumerable<Guid>)
Declaration
protected void RaiseLegacyUploadCompleted(IEnumerable<Guid> guids)
Parameters
SetAdvancedOption(UploaderAdvancedOption, string)
Stores a legacy advanced option flag value.
Declaration
public void SetAdvancedOption(UploaderAdvancedOption name, string value)
Parameters
SetValidationServerData(string)
Stores custom validation data that is later exposed through ClientData.
Declaration
public void SetValidationServerData(string data)
Parameters
| Type |
Name |
Description |
| string |
data |
|
Upload(int, string, Stream)
Uploads a file stream through the v5 backend and raises the legacy events.
Declaration
public void Upload(int filesize, string filename, Stream stream)
Parameters
Upload(int, string, string)
Uploads a temporary file path through the v5 backend and raises the legacy events.
Declaration
public void Upload(int filesize, string filename, string temppath)
Parameters
Events
FileUploaded
Occurs after an individual file has uploaded successfully.
Declaration
public event UploaderEventHandler FileUploaded
Event Type
FileValidating
Occurs before a file is accepted by the server-side validation pipeline.
Declaration
public event UploaderEventHandler FileValidating
Event Type
OnInstanceInit
v4 parity: raised once the uploader instance has been initialised.
v5 raises it at the end of OnInit, which is the same point in
the page lifecycle the legacy control used.
Declaration
public event EventHandler OnInstanceInit
Event Type
UploadCompleted
Occurs after the current batch of uploaded files has completed.
Declaration
public event UploaderBatchEventHandler UploadCompleted
Event Type
Implements