fix(media): replace hardcoded MinIO creds and raw fetch with S3 SDK

- Remove `minioadmin` fallback credentials — app now throws on missing
  MINIO_ACCESS_KEY / MINIO_SECRET_KEY env vars
- Replace raw fetch() PUT/DELETE with @aws-sdk/client-s3 (PutObject,
  DeleteObject) using AWS Signature V4 auth
- Add OnModuleInit bucket existence check + auto-creation
- Use forcePathStyle for MinIO S3 compatibility

Closes TEC-1452

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Ho Ngoc Hai
2026-04-08 04:02:45 +07:00
parent f55c8a8788
commit fcdb3cac9c
3 changed files with 1236 additions and 32 deletions

1173
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff