class S3Provider
implements StorageProvider
Since 0.1.0

AWS S3 storage provider.

Supports native streaming via the facade's getStream method.

Constructors

S3Provider(options?: S3ProviderOptions)
Parameters
optional
options: S3ProviderOptions

S3 connection/injection options

Methods

connect(): Promise<void>

Establishes the S3 client — injects the SDK lazily or uses injected client.

delete(path: string): Promise<boolean>

Deletes an object from S3.

disconnect(): Promise<void>

Disconnect is a no-op for S3 (connectionless HTTP client).

exists(path: string): Promise<boolean>

Reports whether an object exists in S3.

get(path: string): Promise<Uint8Array | null>

Retrieves an object from S3; null when absent.

getSignedUrl(
path: string,
options: { expiresIn: number; }
): Promise<string>

Creates a presigned GET URL for an S3 object.

getStream(path: string): Promise<ReadableStream<Uint8Array> | null>

Native stream download — zero-copy from S3.

Since 0.1.0
isHealthy(): Promise<boolean>

M70c: a client.head('')-shaped bucket probe using the existing head member. Resolves true when the bucket answers, false when it does not (or the provider is not connected).

isReady(): boolean

Reports readiness.

put(
path: string,
data: Uint8Array,
): Promise<void>

Stores an object in S3, recording any content type and user metadata on the object itself — which is what makes a presigned URL render in a browser instead of downloading as application/octet-stream.

Usage

import { S3Provider } from "storage-plugin/src/index.ts";