Skip to content

GetObject

Source: src/Fly/GetObject.ts

Runtime binding for Tigris GetObject over the S3 API.

Bind this operation to a Bucket in Service init. Provide GetObjectHttp.

const getObject = yield* Fly.GetObject(Data);
const text = yield* getObject({ Key: "hello.txt" }).pipe(
Effect.flatMap((result) =>
Stream.mkString(Stream.decodeText(result.Body!)),
),
);