Files: what a decision needs to know

未关闭
#85 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
typescript

调研方向

Start by rereading the platform documentation and standards cited in the issue, then record verified platform facts in the Cloudflare ledger. Draft a decision record answering the listed ownership, storage, upload, serving, sharing, mail, quota, and first-slice questions, and check its status with the project lead. Done means the record is accepted or changed and the roadmap places this module relative to the others.

由索引模型根据 Issue 内容生成。

描述

decision enhancement needs lead

One of the modules the project lead named for the suite (#57): a person's files with folders, sharing inside the instance, public links, and mail attachments saved to it and attached from it. The feature scope lists it in phase C. Nothing is built, and nothing is pulled forward by this issue: it holds the data a decision record will need.

What was read (2026-11-19, from the platform's current documentation and the standards)

The pages were read through a tool that returns extracts. Every figure is checked again at its source, and goes into the Cloudflare ledger, before it enters a record.

The store (R2)

  • An object may be 5 TiB; one upload 5 GiB; a multipart upload has up to 10,000 parts of at least 5 MiB, all but the last the same size; a key is at most 1,024 bytes. Reads, lists and deletes are strongly consistent.
  • The Worker's binding can read, write, delete, list and run a multipart upload. It cannot copy or rename, and it cannot make a presigned address: that needs S3 credentials.
  • Egress is free; storage and operations are what an instance's owner pays. There is no object versioning and no object lock.

Uploads through the Worker

  • A request body is limited by the zone's plan (100 MB on the two smallest), so a large file goes up in parts, each under that limit.
  • The documented way to resume is to send a failed part again.

Serving a file from the app's own site

  • What stops an uploaded file from running in the app's origin: a download disposition, no type sniffing, a fixed safe type, and a sandboxing content policy; or a separate hostname for people's content.

Previews

  • The platform can transform an image of up to 20 MB from the store, with a monthly free allowance and a price after it. Documents have no thumbnail service; a headless browser can render pages at a price.

The tree

  • Since the store cannot rename, a folder tree kept in a database with opaque, unchanging object keys makes a rename or a move one row. A Durable Object's database holds 10 GB, and one row 8 MB.

Sharing

  • A link's token: at least 128 bits from a cryptographic generator, an expiry, and a way to take it back.

Not available or not verified

  • No scanning of uploaded content can be called from a Worker today.
  • Whether the methods a desktop needs to mount a folder (WebDAV) reach a deployed Worker is not verified; only second-hand reports say so.
  • Presigned multipart uploads, a password or download-only link as a standard, and the limits of image transformation beyond size were not read.

A decision record must answer

  • Whose a file is (a person's, a shared space's), and what the membership rules of mail carry over.
  • Where the tree lives and what an object's key is; what deleting means and when the bytes go.
  • How a large file goes up, and whether an instance ever holds S3 credentials.
  • How a file is served so that it can never run in the app's origin; whether people's content gets its own hostname.
  • What a public link is, how long it lives, and who can take it back.
  • How mail meets it: an attachment saved to files, a file attached to a message, and what a link in a message means for a reader outside the instance.
  • Quotas, since the instance's owner pays for storage.
  • What is left out of the first slice on purpose: previews, mounting from a desktop, scanning.

Done when

  • The facts above are re-read at their sources and recorded in the ledger where they are platform facts.
  • A decision record is proposed and accepted or changed by the project lead.
  • The roadmap says where this module stands relative to the others.
主要语言
TypeScript
星标
1
派生
1
平均合并
9 小时 3 分钟
30 天内合并 PR
136

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudhal-dev/podbay 的其他 Issue

查看 cloudhal-dev/podbay 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。