get_answer_attachment
Download a Nettskjema answer attachment to disk as a streamed file and get its absolute path; omit output_path to create a temp file.
Instructions
Download an answer attachment to a file, written to disk.
The attachment is streamed to disk and never inlined: a multi-megabyte audio recording as base64 is useless to a model. The returned path is absolute and tilde-expanded. An existing file at the output path is silently overwritten, and its mode is preserved. A new file (whether from output_path or a temp file) is created with mode 0600 (readable only by the current user).
When output_path is omitted, a temporary file is created in the system temp directory with a suffix derived from the response's media type. The temporary file persists after this call returns and is left on disk for the caller to use or delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_path | No | Destination file path. When omitted, a temporary file is created in the system temp directory. The path may contain ~ for the home directory and may be relative (it will be resolved to an absolute path). | |
| answer_attachment_id | Yes | The attachment's numeric ID. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |