AjaxUploader
Search Results for

    Show / Hide Table of Contents

    Interface IGcsSigner

    Bridges AjaxUploader to a Google Cloud Storage resumable upload session. The core library takes no Google.Cloud.Storage SDK dependency - host apps plug in their own signer by setting Signer at startup.

    GCS resumable upload flow:

    1. CreateUpload(GcsCreateRequest) calls POST /upload/storage/v1/b/{bucket}/o?uploadType=resumable and returns the session URI (the Location response header).
    2. The browser PUTs chunks directly to the session URI with Content-Range headers - no per-chunk signing is required by GCS, but SignChunk(GcsSignRequest) is provided for hosts that wrap the session URI with their own short-lived signed URL (e.g. when the session URI is held server-side).
    3. CompleteUpload(GcsCompleteRequest) records the finalised object.
    4. AbortUpload(GcsAbortRequest) issues DELETE against the session URI to free resources.
    Namespace: AjaxUploader.Providers
    Assembly: AjaxUploader.dll
    Syntax
    public interface IGcsSigner

    Methods

    AbortUpload(GcsAbortRequest)

    Cancels an in-progress resumable upload.

    Declaration
    void AbortUpload(GcsAbortRequest request)
    Parameters
    Type Name Description
    GcsAbortRequest request

    CompleteUpload(GcsCompleteRequest)

    Finalises the upload (typically a no-op for GCS - the object is committed when the final byte range is PUT) and records metadata in the AjaxUploader provider.

    Declaration
    GcsCompleteResult CompleteUpload(GcsCompleteRequest request)
    Parameters
    Type Name Description
    GcsCompleteRequest request
    Returns
    Type Description
    GcsCompleteResult

    CreateUpload(GcsCreateRequest)

    Initiates a GCS resumable upload session and returns the session URI.

    Declaration
    GcsCreateResult CreateUpload(GcsCreateRequest request)
    Parameters
    Type Name Description
    GcsCreateRequest request
    Returns
    Type Description
    GcsCreateResult

    SignChunk(GcsSignRequest)

    Optional: return a signed URL that the browser uses for the chunk PUT. Implementations that let the browser PUT directly to the session URI can return the session URI unchanged.

    Declaration
    GcsSignResult SignChunk(GcsSignRequest request)
    Parameters
    Type Name Description
    GcsSignRequest request
    Returns
    Type Description
    GcsSignResult
    In this article
    Back to top AjaxUploader API Reference