1.2 KiB
1.2 KiB
name, description
| name | description |
|---|---|
| bun-s3-media | Add or maintain Buzz Sheet media uploads using the existing Bun S3-backed flows. Reuse shared upload infrastructure instead of adding feature-specific upload routes. |
Buzz Sheet media uploads
Use the existing media flows when adding an upload feature. Keep S3 credentials and storage writes on the server, and do not create a feature-specific route that duplicates upload handling.
- For public guide images, reuse
MediaUploaderfromcomponents/admin/media-uploader.tsx. It posts toPOST /api/admin/media, which validates the file and writes it to Bun S3 throughlib/media/repository.ts. - For staged private media, reuse the existing presign, browser
PUT, and completion flow in/api/admin/media/presignand/api/admin/media/[id]/complete. Preserve its authorization, metadata, validation, and visibility lifecycle. - For server-side jobs or integrations, use
getMediaStorage()fromlib/media/storage.tsrather than creating another S3 client or storage configuration. Use the existing media URL helper only for objects intended to be publicly served. - If a new feature needs behavior the shared flows do not support, extend the shared media infrastructure while preserving its validation and storage conventions.