space.sendFile() to send files. Pass a local path the sending line can read, or raw bytes in data. Set name so the recipient sees a sensible filename.
Options
| Field | Description |
|---|---|
path | Filesystem path the line can read |
data | Raw bytes (Uint8Array or ArrayBuffer) |
name | Display filename |
sticker | Send as a sticker (iMessage) |
audio | Send as a voice memo — see Voice |
Inbound attachments
Inbound attachment metadata arrives onmessage.content. Fetch bytes through your line’s attachment APIs when you need the file body — webhook deliveries include metadata only.
Platform support
| Platform | sendFile |
|---|---|
| iMessage (cloud / dedicated) | ✅ |
| Terminal | ❌ |
| WhatsApp Business | Use wa.image / wa.document with a hosted link or media id |