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:
- CreateUpload(GcsCreateRequest) calls
POST /upload/storage/v1/b/{bucket}/o?uploadType=resumable
and returns the session URI (the Location response header).
- 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).
- CompleteUpload(GcsCompleteRequest) records the finalised object.
- AbortUpload(GcsAbortRequest) issues
DELETE against the session URI to free resources.
Assembly: AjaxUploader.dll
Syntax
public interface IGcsSigner
Methods
AbortUpload(GcsAbortRequest)
Cancels an in-progress resumable upload.
Declaration
void AbortUpload(GcsAbortRequest request)
Parameters
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
Returns
CreateUpload(GcsCreateRequest)
Initiates a GCS resumable upload session and returns the session URI.
Declaration
GcsCreateResult CreateUpload(GcsCreateRequest request)
Parameters
Returns
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
Returns