AjaxUploader
Search Results for

    Show / Hide Table of Contents

    Interface IUploaderProvider

    Defines the storage operations used by AjaxUploader to save, read, and maintain uploaded files. Providers abstract where file contents and metadata live.

    Namespace: AjaxUploader.Providers
    Assembly: AjaxUploader.dll
    Syntax
    public interface IUploaderProvider

    Methods

    Append(Guid, string, Stream)

    Appends data to an existing uploaded file. This is primarily used by compatibility flows and custom upload pipelines.

    Declaration
    void Append(Guid guid, string fileName, Stream stream)
    Parameters
    Type Name Description
    Guid guid
    string fileName
    Stream stream

    AssembleChunks(string, string, int)

    Assembles saved chunks into a final stored upload. Returns the GUID of the resulting stored file.

    Declaration
    Guid AssembleChunks(string uploadId, string fileName, int totalChunks)
    Parameters
    Type Name Description
    string uploadId
    string fileName
    int totalChunks
    Returns
    Type Description
    Guid

    CopyTo(Guid, string)

    Copies a stored upload to a new destination path.

    Declaration
    void CopyTo(Guid guid, string destinationPath)
    Parameters
    Type Name Description
    Guid guid
    string destinationPath

    Delete(Guid)

    Deletes a stored upload and any metadata associated with it.

    Declaration
    void Delete(Guid guid)
    Parameters
    Type Name Description
    Guid guid

    GetCompletedChunks(string)

    Gets the number of completed chunks for a chunked upload session.

    Declaration
    int GetCompletedChunks(string uploadId)
    Parameters
    Type Name Description
    string uploadId
    Returns
    Type Description
    int

    GetFilePath(Guid)

    Gets the provider-specific file path for a stored upload when available. Providers that do not expose file-system paths may return null.

    Declaration
    string GetFilePath(Guid guid)
    Parameters
    Type Name Description
    Guid guid
    Returns
    Type Description
    string

    GetInfo(Guid)

    Gets metadata for a stored upload.

    Declaration
    UploadedFileInfo GetInfo(Guid guid)
    Parameters
    Type Name Description
    Guid guid
    Returns
    Type Description
    UploadedFileInfo

    GetUploadedLength(string)

    Gets the number of uploaded bytes currently stored for a chunked upload session.

    Declaration
    long GetUploadedLength(string uploadId)
    Parameters
    Type Name Description
    string uploadId
    Returns
    Type Description
    long

    Maintain()

    Performs provider-specific maintenance such as expired file cleanup.

    Declaration
    void Maintain()

    MoveTo(Guid, string)

    Moves a stored upload to a new destination path.

    Declaration
    void MoveTo(Guid guid, string destinationPath)
    Parameters
    Type Name Description
    Guid guid
    string destinationPath

    OpenRead(Guid)

    Opens a stored upload for reading.

    Declaration
    Stream OpenRead(Guid guid)
    Parameters
    Type Name Description
    Guid guid
    Returns
    Type Description
    Stream

    Persist(Guid)

    Marks a stored upload as persisted so cleanup does not remove it automatically.

    Declaration
    void Persist(Guid guid)
    Parameters
    Type Name Description
    Guid guid

    Save(Guid, string, Stream)

    Saves a complete uploaded file. Implementations should also persist metadata needed to reopen the upload later.

    Declaration
    void Save(Guid guid, string fileName, Stream stream)
    Parameters
    Type Name Description
    Guid guid
    string fileName
    Stream stream

    SaveChunk(string, int, Stream)

    Saves one chunk of a chunked upload. Chunks are stored under the supplied upload session identifier until assembly is requested.

    Declaration
    void SaveChunk(string uploadId, int chunkIndex, Stream stream)
    Parameters
    Type Name Description
    string uploadId
    int chunkIndex
    Stream stream
    In this article
    Back to top AjaxUploader 5.0 API Reference