# Function bindings::zaun::bot::messages::upload

> Uploads a file for the bot's next message (capability `attachments`). Returns the attachment id to put in `message-body.attachments`.

`zaun_bot::bindings::zaun::bot::messages::upload` · Function

```rust
pub fn upload(channel_id: &str, name: &str, mime: &str, bytes: &[u8]) -> Result<Id, HostError>
```

Uploads a file for the bot's next message (capability `attachments`). Returns the
attachment id to put in `message-body.attachments`.

[Full rustdoc page](/docs/api/rust/zaun-bot/zaun_bot/bindings/zaun/bot/messages/fn.upload.html)
