interface R2ObjectBody {
    checksums: R2Checksums;
    customMetadata?: Record<string, string>;
    etag: string;
    httpEtag: string;
    httpMetadata?: R2HTTPMetadata;
    key: string;
    range?: R2Range;
    size: number;
    storageClass: string;
    uploaded: Date;
    version: string;
    get body(): ReadableStream<any>;
    get bodyUsed(): boolean;
    arrayBuffer(): Promise<ArrayBuffer>;
    blob(): Promise<Blob>;
    json<T>(): Promise<T>;
    text(): Promise<string>;
    writeHttpMetadata(headers): void;
}

Hierarchy (view full)

Properties

checksums: R2Checksums
customMetadata?: Record<string, string>
etag: string
httpEtag: string
httpMetadata?: R2HTTPMetadata
key: string
range?: R2Range
size: number
storageClass: string
uploaded: Date
version: string

Accessors

  • get bodyUsed(): boolean
  • Returns boolean

Methods

  • Returns Promise<ArrayBuffer>

  • Returns Promise<Blob>

  • Type Parameters

    • T

    Returns Promise<T>

  • Returns Promise<string>