curl -X POST "https://api.tktchurch.com/v1/files/provider/s3/upload" \ -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..." \ -H "Content-Type: image/jpeg" \ -H "Content-Disposition: attachment; filename=\"example.jpg\"" \ --data-binary "@/path/to/example.jpg"
{ "id": "123e4567-e89b-12d3-a456-426614174000", "originalName": "example.jpg", "url": "https://storage.example.com/uploads/abc123.jpg", "key": "uploads/abc123.jpg", "contentType": "image/jpeg", "size": 1048576, "provider": "s3", "providerMetadata": { "bucket": "my-bucket", "region": "us-east-1" }, "uploadedBy": "123e4567-e89b-12d3-a456-426614174001", "createdAt": "2024-01-20T15:00:00Z", "updatedAt": "2024-01-20T15:00:00Z" }
Upload a file to the specified storage provider
uploadFiles
s3
local
attachment; filename="example.jpg"
Show Error Object