@suluk/deploy - v0.1.4
    Preparing search index...

    Interface StorageProvider

    The swappable storage binding (the builder storage slot). Other providers (S3/GCS) implement the same shape.

    interface StorageProvider {
        id: string;
        put(
            key: string,
            body: string | ArrayBuffer | Uint8Array<ArrayBufferLike>,
            opts?: { contentType?: string },
        ): Promise<StoredObject>;
        urlFor(key: string): string;
        delete(key: string): Promise<void>;
    }
    Index

    Properties

    Methods

    Properties

    id: string

    a stable id (matches the @suluk/builder storage-slot impl id, e.g. "r2").

    Methods

    • store bytes server-side; returns the key + its public URL.

      Parameters

      • key: string
      • body: string | ArrayBuffer | Uint8Array<ArrayBufferLike>
      • Optionalopts: { contentType?: string }

      Returns Promise<StoredObject>

    • the public/served URL for a key (no I/O).

      Parameters

      • key: string

      Returns string

    • remove an object — the GDPR erasure target for a user's media.

      Parameters

      • key: string

      Returns Promise<void>