# Collect file

Collect file action block is best used when you want to collect any file or image from your visitors.

Setting up 'File Upload' action block

Collect File action block is made up of the following:

#### Question: <a href="#question" id="question"></a>

Ask a question that will prompt your visitors to upload a file or image.

For example: “Can you upload the invoice?”

#### Format: <a href="#format" id="format"></a>

Select the type of files that you would like to allow visitors to upload.

Following are the formats that are supported:

* .pdf
* .jpg
* .png
* .doc
* .docx
* .ppt
* .xls
* .xslx
* .csv

#### Settings: <a href="#settings" id="settings"></a>

Under settings you can configure the following;

**Restrict file size**: You can select the maximum file size from 1 MB to 10 MB that a visitor can upload from the drop down list.

**Restrict number of uploads**: You can define the maximum number of uploads from 1 to 10 allowed for the visitor.

#### Variables: <a href="#variables" id="variables"></a>

Variables are used to store the input received from the visitor, so you can reference it for later use.

You can either choose an existing variable from the dropdown or create a new one.

**Note**: The uploaded file is stored on wotSABot’s cloud server, and a publicly hosted file URL will be stored in this variable.

[Learn more about variables here.](/wotsabot-help-articles/variables.md)

\ <br>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.wotsabot.ai/wotsabot-help-articles/bot-builder/action-blocks/collect-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
