Skip to content

Comments

Store user and account pictures in R2 instead of DurableObjects#65

Merged
sergeychernyshev merged 11 commits intomainfrom
64-store-user-and-account-pictures-in-r2-instead-of-durableobjects
Feb 22, 2026
Merged

Store user and account pictures in R2 instead of DurableObjects#65
sergeychernyshev merged 11 commits intomainfrom
64-store-user-and-account-pictures-in-r2-instead-of-durableobjects

Conversation

@sergeychernyshev
Copy link
Member

@sergeychernyshev sergeychernyshev commented Feb 22, 2026

This PR transitions user and account picture storage from Durable Objects' internal SQLite storage to Cloudflare R2.

Changes:

  • Added R2 bucket binding to and .
  • Updated and to store and retrieve images from R2 using and formats.
  • Image Management:
    • Added method to and .
    • Added method support to and endpoints.
    • UI: Added "X" removal buttons to User Profile and Account Settings pages (top-right of the image).
    • UI: Implemented image placeholders for the User Profile page, consistent with the Account Settings page.
  • Bug Fix: Ensured is correctly cleared from the database and set to upon image deletion.
  • Removed the table from Durable Object storage schemas.
  • Implemented cleanup logic in methods to remove associated images from R2.
  • Added comprehensive tests in and updated .

Closes #64

✨ Assisted by AI: Gemini

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 22, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
startup-api d9bbf50 Feb 22 2026, 04:08 AM

@sergeychernyshev sergeychernyshev merged commit 4fa3f7f into main Feb 22, 2026
2 checks passed
@sergeychernyshev sergeychernyshev deleted the 64-store-user-and-account-pictures-in-r2-instead-of-durableobjects branch February 22, 2026 04:09
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.

Store user and account pictures in R2 instead of DurableObjects

1 participant