> For the complete documentation index, see [llms.txt](https://docs.agenticflow.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.agenticflow.ai/workflows/workflow-inputs/file-to-url.md).

# File to URL

The **File to URL** control is a versatile input component that allows a user to upload any type of file (e.g., PDF, CSV, DOCX, ZIP). The control then makes the uploaded file available to the workflow via a temporary, secure URL.

This is the most generic file upload control and can be used when the more specific `Upload Image`, `Upload Audio`, or `Upload Video` controls are not suitable.

## When to Use

Use the File to URL control for workflows that need to process files that are not standard images, audio, or video. Common use cases include:

* Extracting text from a PDF document.
* Parsing data from a CSV or Excel file.
* Reading the contents of a text or code file.
* Processing a ZIP archive.

## How to Add

1. From your workflow's **Build** page, click on **+ Add Input**.
2. Select **File to URL** from the list of available controls.

## Configuration

* **Title:** The main label for the file upload field.
* **Description:** Optional helper text to provide more context.
* **Variable Name:** The name used to access the URL of the uploaded file.
* **Optional/Required:** A toggle to specify if the user must upload a file.

## Accessing the Value

After the user uploads a file, this control outputs a temporary, secure URL pointing to that file. This URL is accessible via the variable name you assigned.

For example, if the variable name is `document_file`, the value of `{{document_file}}` will be a URL (e.g., `https://cdn.agenticflow.ai/.../report.pdf`).

**Note:** This URL is temporary and will expire. It is meant for immediate processing within the workflow run.

### Example

**Goal:** Allow a user to upload a PDF document and ask questions about its content.

1. **Add a File to URL Control:**
   * Title: "Upload PDF Document"
   * Variable Name: `pdf_url`
2. **Add a Text Input Control:**
   * Title: "Your Question"
   * Variable Name: `user_question`
3. **Add a "PDF to Text" Node:**
   * **PDF URL:** `{{pdf_url}}`
   * **Purpose:** To extract the raw text from the uploaded PDF.
4. **Add an OpenAI MCP Node:**

   * **Action:** `Chat`
   * **Prompt:**

   ```
   Based on the following document text, please answer the user's question.

   Document Text:
   {{pdf_to_text_1.text}}

   ---
   User Question:
   {{user_question}}
   ```

This workflow creates a simple "Chat with your PDF" application by combining the file upload with text extraction and a powerful language model.
