Rebasely Beta: data may be purged

examples/storefront Public

YAML · 13 lines · 850 B · at 80dbc76

title: Uploading a product imagedescription: >-  The merchant sends the image bytes to the API, which stores them in R2 under a hash of their  content and points the product at the new key. Shoppers load the image from the bucket's custom  domain, so image requests never run the Worker.actors: [merchant, shopper]steps:  - { from: merchant, to: storefront-api, label: "PUT /admin/products/:id/image, admin token" }  - { from: storefront-api, to: db, label: check that the product exists }  - { from: storefront-api, to: images, label: "put products/<id>/<hash>.<ext>, cached a year" }  - { from: storefront-api, to: db, label: set the product's image_key }  - { from: storefront-api, to: merchant, label: "the product, image_url on IMAGES_URL" }  - { from: shopper, to: images, label: "GET <IMAGES_URL>/<key>, from Cloudflare's cache" }