> ## Documentation Index
> Fetch the complete documentation index at: https://notte-experiment-visibility-md-links.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# FileStorage

> Upload and download files for your automations

File storage allows agents to upload and download files from websites. Storage is persistent and session-scoped so you can retrieve files after the session ends.

```python theme={null}
from notte_sdk import NotteClient

client = NotteClient()
storage = client.FileStorage()

# Upload files before the session
storage.upload("document.pdf")

# Attach storage to session
with client.Session(storage=storage) as session:
    agent = client.Agent(session=session)
    agent.run(task="Upload document.pdf and download the receipt")

# Download files after the session
for file_name in storage.list_downloaded_files():
    storage.download(file_name=file_name, local_dir="./downloads")
```

## Methods

### upload

```python theme={null}
upload(file_path: str, upload_file_name: str | None = None) -> bool
```

Upload a local file to storage.

**Parameters:**

* `file_path` - Path to the local file
* `upload_file_name` - Optional custom name for the file in storage

**Returns:** `bool` - Success status

***

### download

```python theme={null}
download(file_name: str, local_dir: str, force: bool = False) -> bool
```

Download a file from storage to a local directory.

**Parameters:**

* `file_name` - Name of the file in storage
* `local_dir` - Local directory to save the file
* `force` - Overwrite existing file (default: False)

**Returns:** `bool` - Success status

***

### list\_uploaded\_files

```python theme={null}
list_uploaded_files() -> list[str]
```

List files you've uploaded to storage.

**Returns:** `list[str]` - List of uploaded filenames

***

### list\_downloaded\_files

```python theme={null}
list_downloaded_files() -> list[str]
```

List files downloaded by agents during sessions.

**Returns:** `list[str]` - List of downloaded filenames

## Parameters

<ParamField path="session_id" type="UnionType[str, None]" default="None" />
