> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/technical-reference/interfaces-and-conversations/file-uploads-generated-files-and-downloads.md).

# File Uploads, Generated Files, and Downloads

Interfaces can collect files from users and return generated downloads. An upload control, its workflow mapping, and the agent's ability to work with a file are separate parts of the setup.

{% embed url="<https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FnO9J72qZWh8fGWIzZfBV%2FStackAI-Uploaded-Files-Guide-Alice.mp4?alt=media&token=9384c7b6-687a-4b4d-836e-d1cbc9f6ac0a>" %}

## Let an agent work with an interface upload

For an assistant that reads or processes uploaded files:

1. Add a **Files** input, expose it to users, and connect it to the agent.
2. Insert the user request and **Files → File URLs** references into the agent's **Prompt**.
3. Enable **File Access** and add **Terminal** from **StackAI Computer**. The builder's **Enable File Access for better file handling** shortcut can configure both; verify the setting and tool afterward.
4. In the interface, select the Files input and intended output. For Chat Assistant, also enable **Show attachment icon**.
5. Test an actual interface upload and inspect the answer, tool result, and any generated download.

[Let an agent work with uploaded files](https://docs.stackai.com/guides-and-quickstarts/interfaces-and-end-user-experiences/let-an-agent-work-with-uploaded-files.md) provides the complete illustrated walkthrough and sample file.

## Interface details

In Chat Assistant, the paperclip can be visible while Files is unchecked in **Fields**. **Required** is a separate setting: it controls whether an upload must be provided, rather than enabling the agent's file tool.

A form collects the file through its mapped input block. Each form submission or batch row supplies its own workflow inputs. Importing a CSV as batch rows is different from asking an agent to analyze that CSV as one uploaded file.

**Draft Preview** runs the current draft. Test the released interface after completing the required publication process. Saving the draft alone does not update the released version.

## Read text or work with the file

For straightforward summaries, pass **Files → Full Parsed Text** into the Prompt. For file inspection, calculations, or generated artifacts, configure the appropriate file tool and tell the agent what work to perform. A workflow upload does not automatically add a document to a knowledge base.

An accepted upload does not prove that parsing succeeded. Scans may need OCR, and file formats or size limits depend on the receiving step and upload control.

## Return and verify downloads

For Terminal-generated files, keep **Enable New Files** on and save new files under `/home/user/`. Ask the agent to return the actual file link provided by the tool. Ensure the interface exposes the intended output.

Open the result and check its contents. A table export and an agent-generated file can contain different information. Download links can expire; use the latest returned link after regenerating a file. Do not use a private download link as a permanent public reference.

## Conversations and troubleshooting

Test file follow-ups in the same conversation with your agent's memory settings. Provide the relevant file again for a new conversation or independent submission. Do not assume attachments or generated files are available across unrelated conversations.

[Troubleshoot uploaded files and downloads](https://docs.stackai.com/guides-and-quickstarts/interfaces-and-end-user-experiences/let-an-agent-work-with-uploaded-files/troubleshoot-uploaded-files-and-downloads.md) covers missing paperclips, missing file access, reading failures, downloads, and differences between draft and published behavior.

## Related guidance

* [Interface Inputs and Output Mapping](https://docs.stackai.com/technical-reference/interfaces-and-conversations/interface-inputs-and-output-mapping.md)
* [File Inputs, Supported Formats, and Size Limits](https://docs.stackai.com/technical-reference/files-knowledge-and-retrieval/file-inputs-supported-formats-and-size-limits.md)
* [Terminal (StackAI Computer)](https://docs.stackai.com/stackai-tools/browser-and-computer/terminal-stackai-computer.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/technical-reference/interfaces-and-conversations/file-uploads-generated-files-and-downloads.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
