Upload an image
request_image_uploadRequires a TechFabric engineer's Microsoft sign-in (scope blog.write). Adds an image to one of your own drafts without the browser editor: returns a one-time upload URL and its Authorization header (15 minutes, one PNG, JPEG, WebP or GIF file of the type given, up to 10 MB), and the curl command that PUTs the file from the engineer's machine. Run that curl as given: the token goes only in the header, never in the URL. Location and camera metadata are removed. Then place_image gives the snippet to put in the post. Pass alt only as the engineer's own words.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The draft's 8-character id (list_drafts lists yours) | |
| alt | No | The engineer's own description of the image, for readers who can't see it (5 to 250 characters; not the file name, "screenshot" or the caption). Never write one yourself: leave it out and ask them | |
| filename | Yes | The image's file name on the engineer's machine (diagram.png): its served name comes from it | |
| content_type | Yes | The image's type; the file's own bytes must say the same |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| alt | No | ||
| curl | Yes | The command to run where the file is | |
| name | Yes | The name the image will be served under (a number is added if the draft already has one) | |
| next | Yes | ||
| method | Yes | ||
| max_bytes | Yes | ||
| expires_at | Yes | ||
| upload_url | Yes | PUT the file here, once, within 15 minutes. It carries no secret | |
| alt_problem | No | Why the alt given wasn't used, and the question to ask the engineer | |
| content_type | Yes | ||
| allowed_types | Yes | ||
| authorization | Yes | The Authorization header to send with the PUT (Bearer <token>): the one-time token, never put in the URL |