Upload a small file
upload-fileWrites small text or base64 files into an existing Foundry data folder, validating accepted upload types and respecting overwrite control.
Instructions
Write a small file (at most 512 KiB) into an existing folder of Foundry's data storage, from text or from base64. An existing file is only replaced with overwrite: true. Scripts and HTML are never written, and Foundry accepts only its upload types. Never inside modules, systems or another world. Needs the write switch. Foundry cannot delete files; there is no tool for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | File name with extension, such as "letter.md" | |
| path | Yes | The folder, such as "worlds/<world>/handouts"; it must exist (create-directory) | |
| text | No | Content of a text file, written as UTF-8 | |
| base64 | No | Content as base64 (a data: URL prefix is accepted); give text or base64 | |
| dryRun | No | Only check and report what would happen; nothing is written. Needs no write permission. | |
| overwrite | No | Replace a file of the same name |