# File Upload & Download

Get data into Studio and results out. Upload CSVs, PDFs, and documents to give the AI context for analysis; download the reports, presentations, and datasets it generates — all stored server-side and accessible from any device.

Note
The AI processes uploaded files inside the server-side sandbox. Files belong to the [work folder](/products/ai-studio/concepts/work-folders) the chat is saved in, where you can browse them from the sidebar and the work folder page. Your local filesystem is never accessed.

## Objective

Move files between your local device and Studio's server-side environment so the AI can analyze your data and you can export its output.

## Prerequisites

- Signed in to Treasure AI Studio ([Getting Started](/products/ai-studio/getting-started))
- An active chat session


## File Size Limits

Warning
The maximum file size for uploads is **100 MB per file**. If you need to work with larger files, consider splitting them into smaller chunks or uploading only the relevant portions.

## Uploading Files

You can upload files from the chat input, to give the AI something to work with right away, or straight into a work folder from its page, without opening a chat at all.

### From the Chat Input

#### Web & Desktop

1. Click the **plus button** (+) in the chat input toolbar
2. Select one or more files from the file picker
3. Files appear as **thumbnails** below the text area, showing the file name and a category icon
4. Type your message (e.g., "Summarize this report" or "Load this CSV into a table")
5. Click **Send** — the files upload and your message is sent together


You can also **drag and drop** files from your computer directly onto the chat area. When you drag a file over the chat, a blue overlay appears with the message **"Drop files here"**. Release to add the files to your pending attachments. Dragging a file out of the sidebar file tree instead inserts its path into the composer without uploading anything — the file is already in Studio. See [Working Across Work Folders](/products/ai-studio/concepts/work-folders#working-across-work-folders).

To remove a pending file before sending, click the **X** button on its thumbnail.

#### Mobile

1. Tap the **plus button** (+) in the composer to open the **Attach file** sheet
2. Choose from:
  - **Camera** — Take a photo to attach
  - **Photo Library** — Select images or video from your photo library
  - **Files** — Browse and select documents
3. You can select multiple files. They appear as **chips** with an **X** below the text area
4. Type your message and tap **Send**


To remove a pending file, tap the **X** on its chip.

### From a Work Folder Page

#### Web & Desktop

1. Open a work folder's page from the sidebar
2. Navigate to the folder you want the files in
3. Click **Upload** and select the files


The files land in the folder you are viewing, not in `uploads/`, so this is the direct way to put a dataset where you want it before starting a chat. See [Organizing Files in a Work Folder](#organizing-files-in-a-work-folder).

### Where Attachments Are Saved

Files you attach in the chat input are saved to an `uploads/` directory, which Studio creates on the first upload.

#### Web & Desktop

Attachments always land in `uploads/` — there is no destination to choose. For a chat in a [work folder](/products/ai-studio/concepts/work-folders), that is the work folder's own `uploads/` directory, so an attachment shows up in the **Uploads** section of the work folder page and in the sidebar file tree along with everything else the folder contains. For a chat with no work folder, `uploads/` belongs to that chat alone.

To file an attachment away afterwards, move it out of `uploads/` from the work folder page: drag the row onto another folder in the **Files** section. See [Organizing Files in a Work Folder](#organizing-files-in-a-work-folder).

#### Mobile

On Mobile, a **directory path input** appears when you have files attached, letting you choose which folder inside the chat's file space receives them:

- The field is prefilled with `uploads` (`my/uploads` in a shared work folder)
- Start typing a path to see **autocomplete suggestions** from existing folders
- Select an existing folder or type a new path to create one


Technical Note
A work folder's files live under `/home/agent/work/{dirname}`, so attachments sent from a chat in that folder are stored at `/home/agent/work/{dirname}/uploads/`. A chat with no work folder keeps its own file space at `/home/agent/chats/{chatId}` and stores attachments under `uploads/` within it. Either way, all of your work folders are available to the AI under `/home/agent/work/` — see [Working Across Work Folders](/products/ai-studio/concepts/work-folders#working-across-work-folders).

## Downloading Files

### AI-Generated Files

When the AI creates a file (a report, spreadsheet, presentation, or other output), a **file card** appears in the chat with:

- **File icon** — Color-coded by category, with the file extension below it (green for spreadsheets, blue for documents, rose for presentations, purple for images, etc.)
- **File name**
- **Size and type** — The file's size followed by its format (e.g., "248.6 KB · PowerPoint"). Formats with no specific label fall back to the category name ("Spreadsheet", "Document"), and the size is omitted until Studio knows it
- **Download** button — Downloads the file to your device


Select the card itself to open the file in the built-in viewer.

### From the File Viewer

#### Web & Desktop

1. Open the file — from a chat message, the sidebar file tree, or a work folder page
2. Click the **download** action in the viewer's header


To download a file without opening it, open its ⋯ menu on the work folder page and choose **Download**.

### Mobile

Tap a file card in a message to open the file in a preview. Mobile does not offer download, share, or save. From a chat's file preview, you can **Delete file**.

## The File Viewer Panel

The panel on the right side of Studio is a viewer for the files you open, not a file manager. Browsing and organizing files happens in the sidebar file tree and on the work folder page — see [Organizing Files in a Work Folder](#organizing-files-in-a-work-folder) — while the panel displays whatever you open from a chat message, the sidebar, or a work folder page.

### Tabs

Each file you open gets its own tab in the panel header. Click a tab to switch files, or its **X** to close it. Studio keeps a separate set of tabs for each chat and work folder, so moving between conversations does not mix up what you had open. A file from a different work folder than the current chat is labeled **folder / filename**, and the viewer names its folder above the content.

### Panel Controls

| Control  | Description  |
|  --- | --- |
| **Delete artifact** | Delete the file in the active tab. Studio asks you to confirm first, and deletion is permanent |
| **Download artifact** | Save the file in the active tab to your device |
| **Maximize artifact** | Open the active file in a near-full-screen overlay. **Close maximized artifact** or **Escape** returns it to the panel — see [Maximize](/products/ai-studio/files/file-viewers#maximize) |
| **Close panel** | Collapse the panel. The button to reopen it appears whenever the chat or work folder you are viewing has open tabs |


Which viewer renders the file depends on its type — see [File Viewers](/products/ai-studio/files/file-viewers).

## Organizing Files in a Work Folder

Work folders expose their files directly, so you can browse, rename, move, copy, upload, and delete them from the sidebar and a dedicated work folder page — without opening a chat. Every [work folder](/products/ai-studio/concepts/work-folders) keeps its own file space, shared by every chat inside it; a chat with no work folder keeps its files to itself, where they are not browsable from the sidebar file tree. File management is available on Web and Desktop.

### The Sidebar File Tree

In the **Work Folders** section of the sidebar, click the chevron next to a work folder to expand it. Each expanded work folder lists its **Chats** and its **Files** — the work folder's file tree, loaded on demand.

Dotfiles and the work folder's `CLAUDE.md` are dimmed and sorted last. A link to another file or folder is labeled **Link**, and a special entry such as a socket is labeled **Special file** — see [Links and Special Files](/products/ai-studio/files/file-viewers#links-and-special-files). Click any file to open it in a [viewer](/products/ai-studio/files/file-viewers); use **Refresh files** to reload the tree from the server. Because the tree lives in the sidebar, you can inspect a work folder's files without starting a conversation.

### The Work Folder Page

Click a work folder's name in the sidebar to open its page. The page gives a semantic view of everything in the work folder, organized into sections:

| Section  | Contents  |
|  --- | --- |
| **Instruction** | The standing guidance the AI follows in every chat here, saved as `CLAUDE.md`. See [Work Folders](/products/ai-studio/concepts/work-folders). |
| **Files** | The work folder's files and folders, in a table showing **Name**, **Updated**, and **Size**. |
| **Uploads** | The folder's `uploads/` inbox — where files attached from the chat composer land — listing each file's name and how recently it changed. Always shown at the folder root, with **"No files uploaded yet"** when empty. Drag a row onto a folder in **Files** to file it away. The full listing, with size and the ⋯ menu, is in **Files**, which shows `uploads/` like any other directory. |
| **Actions and Skills** | The actions and skills defined inside the work folder under `.claude/skills/` — actions listed with a **Run** button, plain skills in a collapsed **Skills (n)** sub-group. Shown at the folder root. See [Actions](/products/ai-studio/skills/actions). |
| **Chats** | The conversations started in this work folder. Start a new one with the compose button. |


The sections appear in that order — **Files**, then **Uploads**, then **Actions and Skills**, then **Chats** — below the folder's instruction and breadcrumb.

In the **Files** section, click a folder's chevron to expand it inline, or click the folder name to drill into it — the breadcrumb, rooted at **Work Folders**, tracks where you are. Clicking a file opens it in the full file view.

### Managing Files

From the work folder page you can organize a work folder's files directly:

| Action  | How  |
|  --- | --- |
| **Upload** | Click **Upload** to add files to the folder you're currently viewing. |
| **New folder** | Click **New folder** and enter a name. Names cannot contain `/` or be `.` or `..`. |
| **Rename** | Open a file or folder's ⋯ menu and choose **Rename**. |
| **Download** | Open a file's ⋯ menu and choose **Download** to save it to your device without opening it first. |
| **Move** | Drag a file or folder onto another folder to move it — including dragging a row out of the **Uploads** section, and into a **different work folder**: drop it onto the destination folder's row or file tree in the sidebar, or onto a folder or breadcrumb entry on the page. If the destination already contains an entry with the same name, Studio refuses the move and shows an error — nothing is overwritten. Dragging an item onto the folder it already sits in, or a folder into its own subtree, is refused with the no-drop cursor. To copy instead of moving, hold Option (macOS) or Ctrl (Windows and Linux) while you drop — see [Copying Files and Folders](#copying-files-and-folders). |
| **Delete** | Open the ⋯ menu and choose **Delete**. You can delete files and folders; deleting a folder also removes everything inside it, so Studio shows the item count and asks you to confirm first. |
| **Ask AI** | Click **Ask AI** (the ✨ button) on a file or folder to start a new chat in that work folder with the path pre-filled in the composer. |


Note
File organization applies to work folders. A chat with no work folder keeps its files in its own file space, which is not browsable from the sidebar file tree or a work folder page.

In a [shared work folder](/products/ai-studio/shared-folders), the same actions apply with one boundary added: the folder itself is what its members see, and the `my/` directory inside it — badged **Only you** — is yours alone. Row actions on the shared side are available only where your [work mode](/products/ai-studio/shared-folders/work-modes) can write; elsewhere they are disabled with *"You can't add or edit in this part of the shared folder — it's view-only for you."* (if the folder's file sections are missing altogether rather than disabled, your work mode is gone rather than narrow — see [Losing a Work Mode](/products/ai-studio/shared-folders/work-modes#losing-a-work-mode)) Chat attachments land under `my/uploads/`, so making one visible to the team is an explicit move: **Share (move out of my/)** on the row's ⋯ menu, or a drag out of `my/`. See [Sharing a File from Your Private Area](/products/ai-studio/shared-folders/using-a-shared-work-folder#sharing-a-file-from-your-private-area).

### Copying Files and Folders

Copy leaves the original where it is and creates a second copy at the destination. Use it when the same dataset or report belongs in two places, or when you want to start from a duplicate without touching the original. On Web and Desktop, copy works by drag and drop, the same way as a move, with a modifier key held while you drop:

| Platform  | Key to hold while you drop  |
|  --- | --- |
| macOS | **Option** |
| Windows and Linux | **Ctrl** |


A plain drag moves the item, and holding the key copies it. You can press or release the key during the drag. The drop target shows **+ Copy** or **Move** before you let go, so you can see which one will happen. Copy accepts the same drop targets as a move: a folder row or the background of the **Files** list on the page, a breadcrumb entry, or a folder or work folder in the sidebar. Copying into another work folder works the same way.

**Names.** Copy never overwrites. If the destination already has the name, the copy gets `(copy)` before its extension, so `report.csv` becomes `report (copy).csv`, and `report (copy 2).csv` if that name is taken too. Folders and links, and a file whose only dot is at the start (such as `.env`), take the suffix after their full name. Copying into the folder an item already sits in always creates a suffixed copy, so you can duplicate a file in place. Copying into a different folder keeps the original name when it is free.

**What is copied.** A file or folder is copied with everything inside it. A link is copied as a link with the same target text. Studio does not resolve it, so the copy can point to something else from its new location. Special entries cannot be copied, and a folder that contains one fails to copy. See [Links and Special Files](/products/ai-studio/files/file-viewers#links-and-special-files).

**Status and limits.** Studio runs one copy at a time, and a second copy cannot start until the first finishes. A status line under the main content shows the copy in progress, with the item name and its destination. When the copy finishes, a notification names the new item and where it is. A single copy can include up to 100,000 entries and 10 GiB. A larger copy fails with *"The copy exceeds the entry or size limit"*, so copy the contents in smaller batches instead.

**Failures.** Copies are not all-or-nothing. If Studio cannot confirm that a copy finished, the status line says that some items may remain at the destination. It offers **Check destination**, which opens that folder, and **Dismiss result**, which clears the message. Check the destination, delete anything you do not want, and then copy again. If a copy cannot start at all, Studio shows *"Could not start the copy"*, and nothing is copied.

**Shared work folders.** In a shared work folder, copy follows the write rules of your work mode. The one difference from a move is that a copy takes nothing away from its source, so a file you can only read can still be copied. See [Using a Shared Work Folder](/products/ai-studio/shared-folders/using-a-shared-work-folder) for what each mode allows.

### The MIGRATED_HOME Folder

Some work folders contain a folder named `MIGRATED_HOME` that you never created. It holds files that used to sit in the AI's home directory — shell configuration, tool settings, and whatever earlier chats happened to leave behind there — in a location outside every work folder, which no file browser could show you.

Studio now gives each chat its own environment and keeps only work folder files permanently, so those older home-directory files were moved into the work folder rather than discarded. See [What Persists After a Chat Ends](/products/ai-studio/security#what-persists-after-a-chat-ends) for what that means going forward.

On the work folder page, `MIGRATED_HOME` sits in the **Files** section among the folders and files you made yourself, sorted by name like any other directory.

Treat `MIGRATED_HOME` as an archive: nothing writes to it any more. Move anything you still want out into the work folder itself, and delete the rest — `MIGRATED_HOME` behaves like any other directory in the work folder, so the ⋯ menu's **Delete** removes it and everything inside.

## File Categories

Studio categorizes files by extension and displays them with color-coded icons. The category drives the icon only — which viewer opens a file is decided separately, so a category and a viewer do not always agree (see [Supported Viewers](/products/ai-studio/files/file-viewers#supported-viewers)):

| Category | Extensions | Icon Color |
|  --- | --- | --- |
| **Spreadsheet** | csv, xlsx, xls, tsv | Green |
| **Document** | md, txt, pdf, doc, docx, html, htm | Blue |
| **Presentation** | pptx, ppt | Rose |
| **Image** | png, jpg, jpeg, gif, svg, webp | Purple |
| **Code** | js, ts, py, sql, sh, yaml, yml | Amber |
| **Data** | json, xml, mmd, mermaid | Blue |
| **Journey** | *.journey.yaml, *.journey.yml | Green |
| **File** | All other extensions | Gray |


## Upload Errors

If a file upload fails, you see the message: **"File upload failed. Message not sent."** The message is not sent to the AI when all file uploads fail.

If some files in a batch succeed and others fail, the message is sent with only the successfully uploaded files.

## File Retention & Deletion

Files stored in Studio are subject to the following retention rules:

| Scenario  | What Happens to Files  |
|  --- | --- |
| **Chat with no work folder deleted** | All files associated with that chat are permanently deleted |
| **Work folder chat deleted** | Files are **not** deleted. They remain accessible in the work folder workspace |
| **Automatic expiration** | Files belonging to a chat with no work folder are deleted with it after the configured [chat retention period](/products/ai-studio/security/data-retention) (default: 28 days). Files in a work folder outlive the chats that created them |


Important
File deletion is permanent and cannot be undone. Download any files you need before deleting a chat that has no work folder, or before the retention period expires. Files kept in a work folder are not affected by chat deletion.

## Verification

- [ ] Attach a file via the plus button and see it appear as a thumbnail/pill
- [ ] Send a message with the file and see the AI reference its contents
- [ ] Download an AI-generated file using the **Download** button on a "Created file" card
- [ ] Hold Option (macOS) or Ctrl (Windows and Linux), drop a file onto its own folder in the work folder page, and see a `(copy)` copy appear


## Troubleshooting

| Issue | Solution |
|  --- | --- |
| "File upload failed. Message not sent." | Check your network connection and try again. Files must be under 100 MB — if larger, split the file or upload only the relevant section |
| Uploaded file not referenced by AI | The AI processes file contents asynchronously. Wait for the upload indicator to complete, then re-send your message |
| Download button not visible | Only AI-generated files show a **Download** button on the "Created file" card. Uploaded files can be downloaded from the work folder page — open the file's ⋯ menu and choose **Download**, or open it and use the viewer's download action |
| A `MIGRATED_HOME` folder you did not create | It holds files that used to live in the AI's home directory, moved into the work folder so they stayed reachable. Nothing writes to it now — keep what you need and delete the rest. See [The MIGRATED_HOME Folder](#the-migrated_home-folder) |
| A file the AI created is missing from the work folder | Only files written inside the work folder persist; a working file the AI wrote elsewhere in its environment goes with the chat. If that chat still exists, reopen it and ask the AI to save the file into the work folder — its environment may still hold it. Otherwise ask for the file again in a new chat. See [What Persists After a Chat Ends](/products/ai-studio/security#what-persists-after-a-chat-ends) |
| "Could not confirm the copy completed. Some items may remain at …" | Studio could not confirm that the copy finished. Select **Check destination** on the status line, delete anything you do not want, and copy again. See [Copying Files and Folders](#copying-files-and-folders) |
| A folder containing a special entry shows "Could not confirm the copy completed" | The folder contains a special entry, such as a socket. Special entries cannot be copied, so the folder cannot be copied as a whole. See [Links and Special Files](/products/ai-studio/files/file-viewers#links-and-special-files) |


## Next Steps

- [File Viewers](/products/ai-studio/files/file-viewers) — How Studio renders PDFs, spreadsheets, presentations, and more
- [Using a Shared Work Folder](/products/ai-studio/shared-folders/using-a-shared-work-folder) — The `my/` boundary, and moving a file out of it
- [AI Chat Interface](/products/ai-studio/chat/chat) — Sending messages with file context
- [AI-Generated Files](/products/ai-studio/files/artifacts) — Asking the AI for PPTX, DOCX, PDF, and XLSX deliverables
- [Chat Data Retention](/products/ai-studio/security/data-retention) — Configuring how long chat history and associated files are retained