Setu-TS
    Preparing search index...

    Interface IR2Bucket

    interface IR2Bucket {
        delete(key: string): Promise<void>;
        get(key: string): Promise<IR2ObjectBody | null>;
        head(key: string): Promise<IR2Object | null>;
        put(
            key: string,
            value: ArrayBuffer | ArrayBufferView<ArrayBufferLike>,
            options?: R2PutOptions,
        ): Promise<IR2Object | null>;
    }
    Index
    • Writes an object.

      Parameters

      • key: string

        The object key

      • value: ArrayBuffer | ArrayBufferView<ArrayBufferLike>

        The object bytes

      • Optionaloptions: R2PutOptions

        R2's own put options. The platform spells the content type httpMetadata.contentType and user metadata customMetadata, which is why R2Storage.put translates rather than forwarding PutObjectOptions unchanged.

      Returns Promise<IR2Object | null>

      The stored object's metadata