Skip to content

feat(storage): configure upload http metadata #18

Description

@ClaudiaFang

Feature

Allow configuring HTTP metadata when uploading files to S3-compatible storage, including Cloudflare R2.

Requirements

  • Set Content-Type correctly for uploaded files based on their actual media type or extension (for example, image/webp, image/jpeg, image/png).
  • Add a configurable Cache-Control value for uploaded objects.
  • Apply the metadata consistently to S3-compatible uploads, including Cloudflare R2.
  • Preserve sensible defaults so existing users do not need to change their configuration.
  • Document the new settings and recommended values for immutable/versioned assets versus replaceable files.

Acceptance criteria

  • WebP uploads are served as image/webp, not image/jpeg.
  • The configured cache policy is sent with the upload request and is visible in the object response headers.
  • Existing upload workflows remain compatible when the new settings are omitted.
  • Tests cover MIME type detection and metadata propagation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions