AjaxUploader
Search Results for

    Show / Hide Table of Contents

    Class AjaxUploaderConfig

    Static configuration for AjaxUploader, populated from appSettings and overridable at runtime. Supported keys include AjaxUploader.TempDirectory, AjaxUploader.MaxFileSize, AjaxUploader.AllowedExtensions, AjaxUploader.AllowedMimeTypes, AjaxUploader.ChunkSize, AjaxUploader.HandlerPath, AjaxUploader.EnableResume, AjaxUploader.TempFileExpiryMinutes, AjaxUploader.MaxFilesPerUpload, and AjaxUploader.LicenseFile.

    Inheritance
    object
    AjaxUploaderConfig
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: AjaxUploader
    Assembly: AjaxUploader.dll
    Syntax
    public static class AjaxUploaderConfig

    Properties

    AllowedExtensions

    Gets or sets the global allow-list of file extensions.

    Declaration
    public static string[] AllowedExtensions { get; set; }
    Property Value
    Type Description
    string[]

    AllowedMimeTypes

    Gets or sets the global allow-list of MIME types.

    Declaration
    public static string[] AllowedMimeTypes { get; set; }
    Property Value
    Type Description
    string[]

    ChunkSizeBytes

    Gets or sets the default chunk size in bytes used when chunked uploads are enabled.

    Declaration
    public static int ChunkSizeBytes { get; set; }
    Property Value
    Type Description
    int

    EnableResume

    Gets or sets whether resumable upload support is enabled by default.

    Declaration
    public static bool EnableResume { get; set; }
    Property Value
    Type Description
    bool

    HandlerPath

    Gets or sets the virtual handler path used to serve resources and upload endpoints.

    Declaration
    public static string HandlerPath { get; set; }
    Property Value
    Type Description
    string

    LicenseFile

    Gets or sets an explicit path to the license file.

    Declaration
    public static string LicenseFile { get; set; }
    Property Value
    Type Description
    string

    MaxFileSizeBytes

    Gets or sets the maximum upload size in bytes applied by the server-side services.

    Declaration
    public static long MaxFileSizeBytes { get; set; }
    Property Value
    Type Description
    long

    MaxFilesPerUpload

    Gets or sets the global maximum number of files accepted by a single upload operation.

    Declaration
    public static int MaxFilesPerUpload { get; set; }
    Property Value
    Type Description
    int

    RequireSignedCloudSessions

    Requires direct-to-cloud presign calls after create to carry the server-issued session token, and makes the server-bound object key and upload id take precedence over anything the client sends.

    Off by default so existing signer implementations and clients keep working unchanged. Turn it on. With it off, a caller can pass any object key to s3/sign, s3/complete or s3/abort - which means choosing where in your bucket the object lands, and acting on uploads it did not start.

    Tokens are protected with the ASP.NET machine key, so a web farm must have an explicitly configured, shared machine key - the same requirement as view state.

    Declaration
    public static bool RequireSignedCloudSessions { get; set; }
    Property Value
    Type Description
    bool

    ResolvedHandlerUrl

    Gets the resolved handler URL (relative to app root).

    Declaration
    public static string ResolvedHandlerUrl { get; }
    Property Value
    Type Description
    string

    ResolvedTempDirectory

    Gets the resolved temp directory path. Falls back to ~/App_Data/UploaderTemp.

    Declaration
    public static string ResolvedTempDirectory { get; }
    Property Value
    Type Description
    string

    TempDirectory

    Gets or sets the temporary upload directory. Relative values are resolved from the site root.

    Declaration
    public static string TempDirectory { get; set; }
    Property Value
    Type Description
    string

    TempFileExpiryMinutes

    Gets or sets the age limit, in minutes, after which temporary upload files are eligible for cleanup.

    Declaration
    public static int TempFileExpiryMinutes { get; set; }
    Property Value
    Type Description
    int

    Methods

    VersionedResourceUrl(string, string)

    Builds the URL for a handler-served static resource ("js", "css") with a cache-busting version token.

    Declaration
    public static string VersionedResourceUrl(string handlerUrl, string resource)
    Parameters
    Type Name Description
    string handlerUrl
    string resource
    Returns
    Type Description
    string
    Remarks

    These resources are served with Cache-Control: public, max-age=30 days on a URL that never changed - so after a DLL upgrade, every returning visitor kept executing the PREVIOUS engine for up to a month. Every emit site must build the URL through here.

    The token is a hash of the bytes actually served, NOT the assembly file version. The file version only changes when someone bumps it, and a same-version rebuild - which every patch-level repackage does - left the URL identical while the content changed, so browsers and CDNs went on serving the previous engine behind an unchanged URL.

    In this article
    Back to top AjaxUploader API Reference