Add S3 presigned URL direct upload (presign → PUT → confirm)

- Add presign endpoint: POST /api/v1/transactions/presign
- Add confirm endpoint: POST /api/v1/transactions/confirm
- Add generate_presigned_put_url() to MinIO service with public endpoint support
- Add public_endpoint field to MinioConfig
- Keep legacy /upload endpoint as fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-05-28 12:51:10 +08:00
parent e3c84540eb
commit fe81153491
5 changed files with 100 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ from pydantic import BaseModel
class MinioConfig(BaseModel):
endpoint: str
public_endpoint: str = ""
bucket: str = "snapledger"
access_key: str
secret_key: str