Upload Media
Upload images and videos to use in your posts.
Overview
PostPeer provides presigned S3 URLs for media uploads. The flow is:
- Request a presigned upload URL from PostPeer
- Upload the file directly to S3 using the presigned URL
- Use the returned public URL in your post's
mediaItems
Get Upload URL
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
filename | string | Yes | Name of the file (e.g. "photo.jpg") |
mimeType | string | Yes | MIME type of the file (e.g. "image/jpeg", "video/mp4") |
Only image/* and video/* MIME types are allowed.
Example
Response
Upload the File to S3
Use the uploadUrl from the response to upload the file directly:
Use in a Post
After uploading, use the publicUrl as the media URL in your post:
Supported Formats
| Type | Formats |
|---|---|
| Images | JPEG, PNG, GIF, WebP |
| Videos | MP4, MOV |
Status Codes
| Code | Meaning |
|---|---|
200 | Upload URL generated |
400 | Unsupported MIME type or missing fields |