Upload an image
POST/v1/upload/image
Uploads an image file to AWS S3 and returns a CloudFront CDN URL. Supported formats: JPEG, PNG, GIF, WebP. Maximum file size: 3MB.
Request
- multipart/form-data
Body
required
file binaryrequired
Image file to upload (max 3MB)
Responses
- 201
- 400
- 500
Image uploaded successfully. Returns CloudFront URL
- application/json
- Schema
- Example (from schema)
Schema
- any
{
"url": "https://d1234abcd.cloudfront.net/uploads/a1b2c3d4-e5f6-7890-abcd-ef1234567890.jpg"
}
Invalid file type (only images allowed) or file size exceeds 3MB limit
- application/json
- Schema
- Example (from schema)
Schema
- any
{
"statusCode": 400,
"message": "Invalid file type. Only images are allowed.",
"error": "Bad Request"
}
Server error during upload
Loading...