Skip to content

feat(cloudflare): R2BucketNotifications#1359

Merged
sam-goodwin merged 7 commits intomainfrom
sam/r2-notifications
Mar 11, 2026
Merged

feat(cloudflare): R2BucketNotifications#1359
sam-goodwin merged 7 commits intomainfrom
sam/r2-notifications

Conversation

@sam-goodwin
Copy link
Collaborator

Adds R2BucketNotification resource to send bucket events to Queues.

Usage

const bucket = await R2Bucket("uploads");
const queue = await Queue<R2BucketNotificationMessage>("events");

await R2BucketNotification("notifications", {
  bucket,
  queue,
  eventTypes: ["object-create"],
  prefix: "incoming/",
});

await Worker("processor", {
  entrypoint: "./src/processor.ts",
  eventSources: [queue],
});

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 10, 2026

Open in StackBlitz

npm i https://pkg.pr.new/alchemy@1359

commit: 8f6df11

@sam-goodwin sam-goodwin merged commit df3b6e1 into main Mar 11, 2026
4 of 5 checks passed
@sam-goodwin sam-goodwin deleted the sam/r2-notifications branch March 11, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant