Upload Files
This example shows how to upload files to your Athena workspace and manage them using the Tools API. You can upload various file types including PDFs, Excel files, CSVs, and images.
Key features:
- Upload files from Node.js filesystem or browser
- Support for multiple file types (PDF, Excel, CSV, images)
- File management with workspace browsing
- Retrieve file content and metadata
- Full TypeScript support with proper error handling
Browse Workspace Contents
Before uploading, you can list existing files and folders in your workspace. The listContents
method provides a comprehensive view of your workspace structure:
Advanced Listing Options
You can customize the listing behavior with optional parameters:
Response Structure
The listContents
method returns a FolderResponse
object with:
structure_tree_ascii
: A visual ASCII tree representation of the folder structuretree_data
: Detailed information about each asset and folder, organized as a tree structure