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.
Feature
Allow configuring HTTP metadata when uploading files to S3-compatible storage, including Cloudflare R2.
Requirements
Content-Typecorrectly for uploaded files based on their actual media type or extension (for example,image/webp,image/jpeg,image/png).Cache-Controlvalue for uploaded objects.Acceptance criteria
image/webp, notimage/jpeg.