Upload an image with automatic format validation and correction
multipart/form-data:
| Parameter | Type | Required | Description |
|---|---|---|---|
file | file | Yes | Image file to upload |
folder | string | No | Folder path (e.g., logos, images/products) |
| Field | Type | Description |
|---|---|---|
success | boolean | Whether upload succeeded |
file_id | string | Unique file identifier (path in bucket) |
bucket | string | Client’s bucket name |
key | string | Full key/path in bucket |
url | string | Public URL to access the file |
size | integer | File size in bytes |
content_type | string | MIME type (auto-detected from magic bytes) |
detected_format | string | Detected image format (JPEG, PNG, WebP, etc.) |
original_filename | string | Original filename as submitted |
corrected_filename | string | Filename with correct extension |
format_corrected | boolean | Whether filename was auto-corrected |
.jpg extension:
Logo Uploads
User Avatars
Product Images
Social Media Imports
| Feature | /media/images/upload | /media/files/upload |
|---|---|---|
| Validation | Strict - rejects non-images | Permissive - accepts any file |
| Auto-correction | Yes - fixes extensions | No - uses provided extension |
| Format detection | Returns detected_format | No format info |
| Use case | Images only | Any file type |