> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odella.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# File Block

> Upload and use file data in your workflow

## Overview

The File Block allows you to upload and use file data in your workflow. It supports various file types including PDF, Microsoft Word documents (.doc, .docx), and CSV files. This block is particularly useful when you need to work with external data or documents within your flow.

<Frame>
  <img src="https://mintcdn.com/odella/I7v1Fbrp2kx7rLoj/block-reference/assets/file_light.png?fit=max&auto=format&n=I7v1Fbrp2kx7rLoj&q=85&s=a2ac486f05ee2ea0457e0ddfcee9cc40" alt="File Block Screenshot" className="block dark:hidden" width="804" height="292" data-path="block-reference/assets/file_light.png" />

  <img src="https://mintcdn.com/odella/I7v1Fbrp2kx7rLoj/block-reference/assets/file_dark.png?fit=max&auto=format&n=I7v1Fbrp2kx7rLoj&q=85&s=af379b8f5d128bd6d2cb42c3f1db2e42" alt="File Block Screenshot" className="hidden dark:block" width="768" height="272" data-path="block-reference/assets/file_dark.png" />
</Frame>

## Inputs

This block does not have any inputs.

## Outputs

<ResponseField name="data" type="file">
  The uploaded file data that can be used by other blocks in the workflow.
</ResponseField>

## Editor Settings

<ParamField path="File" type="file" accept="application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/csv">
  Upload a file from your local system. Supported file types include:

  * PDF files (.pdf)
  * Microsoft Word documents (.doc, .docx)
  * CSV files (.csv)
</ParamField>

<ParamField path="Width" type="number" default={300}>
  The width of the block in pixels.
</ParamField>

<ParamField path="Hidden" type="boolean" default={true}>
  Whether the block is hidden in the block menu.
</ParamField>

## Example: Using a File Block with PDF Analysis

1. Add a File Block to your flow.
2. In the block's settings, click "Upload File" and select a PDF document from your local file system.
3. Connect the `data` output of the File Block to an AI block capable of analyzing PDF content, such as a custom PDF Analysis block.
4. Run your flow. The PDF content will be processed by the AI block for further analysis or extraction.

## Error Handling

The File Block will throw an error if:

* No file data is provided
* The file provider is not available
* The file upload fails or cannot be accessed

<Warning>
  Ensure that you have the necessary permissions to use and process the files you upload, especially when working with sensitive or copyrighted material.
</Warning>

## FAQ

<AccordionGroup>
  <Accordion title="What file types are supported?">
    The File Block supports:

    * PDF files (.pdf)
    * Microsoft Word documents (.doc, .docx)
    * CSV files (.csv)
  </Accordion>

  <Accordion title="Can I use the File Block to upload multiple files at once?">
    No, the File Block is designed to handle one file at a time. If you need to work with multiple files, you can use multiple File Blocks in your workflow.
  </Accordion>

  <Accordion title="How can I process the uploaded file data?">
    The file data output from the File Block can be connected to other blocks in your workflow that are capable of processing the specific file type. For example, you might connect a PDF file to a PDF text extraction block, or a CSV file to a data analysis block.
  </Accordion>
</AccordionGroup>

## See Also

* [Text Block](/block-reference/data/text)
* [Table Block](/block-reference/loaders/read-table)
* [Analyze Table Block](/block-reference/ai/analyze-table)
