Skip to content

feat: implement R2 storage operations #104

Closed
@nullcoder

Description

@nullcoder

Overview

Implement storage operations for metadata and blob handling in R2, building on the R2 client wrapper to provide high-level storage functionality for GhostPaste.

Tasks

  • Implement metadata upload/download (JSON) using R2 API
  • Implement blob upload/download (binary) using R2 API
  • Implement streaming for large files
  • Add retry logic for transient failures
  • Create storage utility functions
  • Write integration tests with miniflare

Technical Requirements

  • JSON metadata stored with content-type application/json
  • Binary blobs stored with content-type application/octet-stream
  • Streaming support for files up to 5MB
  • Exponential backoff for retries
  • Consistent key naming scheme

Acceptance Criteria

  • Can store and retrieve JSON metadata
  • Can store and retrieve binary blobs
  • Streaming works for files up to 5MB
  • Handles network errors gracefully
  • Integration tests pass with miniflare
  • Retry logic handles transient failures

Dependencies

References

  • See docs/PHASE_5_ISSUE_TRACKING.md for detailed specifications

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI endpoints and backend logicenhancementNew feature or requestpriority: criticalMust be done immediately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions