Blogs
Upload Image File
Upload an image file and receive a public URL.
Request flow:
- fileKey is required by the v1 contract, and its entire value is validated.
- A bare filename defaults to post_image; otherwise, the value must start with a supported image prefix. The prefix or default selects the asset bucket/type and required API scope.
- The validated requested object path and filename are not persisted as the stored key. To prevent key collisions and unauthorized overwrites, the server generates the final key as <bucket>/api-<blogId>/<UUID>.
- Treat the returned publicUrl as the authoritative URL for the uploaded asset.
- Send the raw file bytes as the request body.
- Allowed MIME types: image/png, image/jpeg, image/gif, image/webp, image/x-icon
Limits:
- Maximum file size: 10MB
- Upload rate limiting applies.
post/upload
Query parameters
fileKeystring required
fileKey is required by the v1 contract, and its entire value is validated. A bare filename defaults to post_image; otherwise, use a supported image prefix. The prefix or default selects the asset type and required API scope. The validated requested path and filename are not persisted; the server generates <bucket>/api-<blogId>/<UUID>.
Response
Upload completed successfully
Example response
{
"publicUrl": "https://source.inblog.dev/post_image/api-123/123e4567-e89b-42d3-a456-426614174000"
}Changes
No recorded changes to this endpoint across all 1 revision of this API.