download_file
Retrieve the contents of a file attached to a row in a file or image column, returning text for readable formats and a download URL for binary files. Use get_row first to list available files, then specify the file name to download a specific one.
Instructions
Read the content of a file attached to a row in a file or image column. Use get_row first to see available files in the column, then pass the exact file_name to select a specific file.
Returns JSON with: file_name, file_size (bytes), content, content_type, and download_link (only when content_type is "binary_url").
content_type values:
"text": file content returned as text (.txt, .csv, .md, .json, .xml, .html, .yaml, .sql, and common programming languages)
"pdf_text": extracted text from PDF files
"binary_url": non-text files, files >1 MB, or external URLs — content contains a message, download_link contains the URL
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | Target table name | |
| column | Yes | Name of the file or image column | |
| row_id | Yes | Row ID containing the file | |
| file_name | No | Specific file name to download (if column contains multiple files). If omitted, the first file is used. |