OINO TS
    Preparing search index...

    Class OINOBlobAwsS3

    AWS S3 (and S3-compatible) implementation of OINOBlob.

    Authenticates using static access key credentials supplied via a JSON-encoded connection string. Connection parameters map as:

    • params.url → optional custom endpoint, e.g. https://s3.eu-west-1.amazonaws.com or a compatible service such as MinIO / Cloudflare R2
    • params.container → S3 bucket name
    • params.connectionStr → JSON string: {"region":"…","accessKeyId":"…","secretAccessKey":"…"}

    Register and use via the factory:

    import { OINOBlobFactory } from "@oino-ts/blob"
    import { OINOBlobAwsS3 } from "@oino-ts/blob-aws"

    OINOBlobFactory.registerBlob("OINOBlobAwsS3", OINOBlobAwsS3)

    const blob = await OINOBlobFactory.createBlob({
    type: "OINOBlobAwsS3",
    url: "", // leave empty for default AWS endpoint
    container: "my-bucket",
    connectionStr: JSON.stringify({
    region: "us-east-1",
    accessKeyId: process.env.AWS_ACCESS_KEY_ID,
    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
    })
    })

    Hierarchy

    • unknown
      • OINOBlobAwsS3
    Index

    Constructors

    Methods

    • Initialise the AWS SDK S3 client from the JSON-encoded connectionStr. Does not perform any network call.

      Returns Promise<OINOResult>

    • Delete a named object.

      Parameters

      • name: string

        full object key (path within the bucket)

      Returns Promise<void>

    • Download the raw content of a named object.

      Parameters

      • name: string

        full object key (path within the bucket)

      Returns Promise<OINOBlobFetchResult>

    • Attach a static OINOBlobDataModel to the given API, adding only the four fields that S3 object listings return (contentType is omitted because S3 does not include it in listing responses).

      Parameters

      • api: OINOApi

        the OINOBlobApi whose data model is to be initialised

      Returns Promise<void>

    • List all objects in the bucket, applying a server-side S3 Prefix filter where possible and in-memory result filtering for all other predicates.

      • The name field supports server-side prefix filtering via ListObjectsV2 Prefix option (query filtering).
      • All other field predicates (etag, lastModified, contentLength, contentType) are evaluated in-memory after the listing (result filtering). Note: S3 listing does not return contentType; it defaults to "application/octet-stream" unless a contentType filter is applied.

      Parameters

      • Optionalfilter: OINOQueryFilter

        optional query filter to apply

      Returns Promise<OINOBlobEntry[]>

    • Upload (create or replace) an object with the given binary content.

      Parameters

      • name: string

        full object key (path within the bucket)

      • content: Uint8Array

        binary content to store

      • contentType: string

        MIME type of the content (e.g. "image/jpeg")

      Returns Promise<void>

    • Verify that the target bucket exists and is accessible using a HeadBucket call.

      Returns Promise<OINOResult>