Skip to main content
Each recipe is one feature wired end to end: the handler, the route, the component, the page that renders the result, and the delete. The choices are made and explained, so you can copy one, rename the paths, and have it work. Pick by the shape of the data: Three rules run under every one of them:
  • Your database is the index. The bucket only holds the bytes, so every page reads a row rather than listing the bucket.
  • A path is unique per upload or overwritten on purpose, never both. Caching explains what each choice lets you cache.
  • Ids go in state, facts about the object in metadata. state reaches only onUploadComplete, and it travels through the browser, so never put secrets in it. metadata is also written onto the object, for a later bucket.info() to read back. Upload handler has both.
If you have not created a bucket yet, start with the Quickstart.