@backblaze-labs/b2-sdk - v0.4.0
    Preparing search index...

    Interface B2ObjectWriteStreamOptions

    Options accepted by B2Object.createWriteStream.

    interface B2ObjectWriteStreamOptions {
        concurrency?: number;
        contentType?: string;
        customUploadTimestamp?: number;
        fileInfo?: Record<string, string>;
        onCleanupFailure?: CleanupFailureListener;
        onProgress?: ProgressListener;
        onUploadRetry?: UploadRetryListener;
        partSize?: number;
        progressIntervalMillis?: number;
        retry?: Partial<RetryOptions>;
        retryResponseBodyFailures?: boolean;
        serverSideEncryption?: EncryptionSetting;
        signal?: AbortSignal;
    }

    Hierarchy (View Summary)

    Index
    concurrency?: number

    Maximum number of parts uploaded in parallel. Defaults to 4.

    contentType?: string

    MIME type. Defaults to "b2/x-auto".

    customUploadTimestamp?: number

    B2 upload timestamp override in milliseconds since epoch. Sets the file version uploadTimestamp; distinct from src_last_modified_millis metadata. Requires B2 account enablement for Custom Upload Timestamp.

    fileInfo?: Record<string, string>

    Custom key-value metadata stored with the file.

    onCleanupFailure?: CleanupFailureListener

    Callback invoked if best-effort cancellation fails, or if cancellation is skipped because b2_finish_large_file may already have committed.

    onProgress?: ProgressListener

    Callback invoked with upload progress events.

    onUploadRetry?: UploadRetryListener

    Callback invoked before a fresh-URL upload retry.

    partSize?: number

    Target part size in bytes. Defaults to the account's recommended part size.

    progressIntervalMillis?: number

    Minimum milliseconds between byte-only progress callbacks. Defaults to the SDK's 100 ms progress interval; set to 0 for per-chunk callbacks. Part-completion progress callbacks are always emitted immediately.

    retry?: Partial<RetryOptions>

    Retry settings shared with the main transport retry configuration.

    retryResponseBodyFailures?: boolean

    Whether ambiguous failures after an upload POST should be retried, including response-body read failures and transport errors where B2 may have stored the payload before the success response was lost. Defaults to false. Set true only when duplicate versions or parts are acceptable.

    serverSideEncryption?: EncryptionSetting

    Server-side encryption applied to each part.

    signal?: AbortSignal

    Abort signal that cancels the upload and the unfinished large file.