Skip to main content

Usage

Access this class through the composio.remoteFile property:

Properties

Methods

blob()

Fetches the file content as a Blob.
Returns Promise<Blob> — The file content as a Blob

buffer()

Fetches the file content as a buffer.
Returns Promise<Uint8Array> — The file content as a Uint8Array

save()

Downloads and saves the file to the local filesystem. Requires a Node.js runtime with file system support (not available in Cloudflare Workers/Edge).
Parameters Returns Promise<string> — The absolute path where the file was saved

text()

Fetches the file content as UTF-8 text.
Returns Promise<string> — The file content as a string

parse()

Parses an API response (snake_case) and returns a RemoteFile instance.
Parameters Returns RemoteFile — A RemoteFile instance