Get media upload URL
get_upload_urlGet a presigned S3 URL to upload a LOCAL media file (image/video) for a post. Request once per file; for the same unfinished upload, identical postGroupId/fileName/contentType/type reissues the URL with the same mediaId. Use unique fileNames for different files. This reserves a slot but does not upload bytes. Next: HTTP PUT the raw bytes to uploadUrl with the SAME Content-Type, then complete_media with the mediaId and get_post to verify ready before scheduling. If you cannot access bytes or perform PUT, use a public HTTPS mediaUrls URL or upload through Publora. If a slot already exists, inspect get_post and remove only that specific unfinished reservation with delete_media before adding the replacement, only when the user's task authorizes abandoning it. mediaUrls appends attachments and leaves existing slots in place; do not infer abandonment from an upload error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Media type: 'image' or 'video' | |
| fileName | Yes | File name, e.g. 'photo.jpg' | |
| contentType | Yes | MIME type, e.g. 'image/jpeg' or 'video/mp4' | |
| postGroupId | Yes | Post group ID to attach media to |