Write a file
write_fileCreate or replace a file. Keeps owner and mode of an existing file and saves its previous version under /var/lib/askyourstack/backups. Parent folders are created. Give the text as content, or a file from this conversation (an image generated here or one the user attached, up to 15 MB) as file, for example a picture into a shop's pub/media or wp-content/uploads folder; make it readable by the web server's user afterwards if the folder needs that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | No | One plain sentence for the user, shown on the approval page if this call needs their approval: what it does and why it is needed. | |
| file | No | A file from this conversation, written as it is (its bytes, not text). | |
| mode | No | Octal, like 0644. Default: keep existing, or 0644. | |
| path | Yes | ||
| server | No | Server name or id. Optional when the account has one server. | |
| content | No | The file's text, or its bytes in base64 with encoding base64. Leave out when file is given. | |
| encoding | No | ||
| approval_id | No | Only when repeating a call the user approved. |