跳到正文
文章中级

借助 R2 事件通知自动总结上传的 PDF

利用 R2 事件通知和 Queues,在 PDF 上传后立即用 Workers AI 生成摘要,并把摘要保存回存储桶。

最近更新
2026年10月12日
阅读原文

该介绍目前仅提供英文版本。

When a PDF lands in an R2 bucket, an event notification puts a message on a queue; a Worker consumes it, extracts the PDF’s text, summarizes it with Workers AI and writes the summary as a text file to the same bucket.

What you’ll learn

  • Build an upload front end
  • Create a queue and enable R2 event notifications
  • Extract text from a PDF
  • Summarize with Workers AI and store the result in R2

Cloudflare products used

R2, Queues, Workers AI.

Follow the full, step-by-step tutorial in Cloudflare’s documentation.

继续学习